[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bash-4.0 and checkjobs w/non-login shell
From: |
Mike Frysinger |
Subject: |
Re: bash-4.0 and checkjobs w/non-login shell |
Date: |
Mon, 23 Feb 2009 19:25:06 -0500 |
User-agent: |
KMail/1.11.0 (Linux/2.6.28; KDE/4.2.0; x86_64; ; ) |
On Monday 23 February 2009 18:05:26 Chet Ramey wrote:
> Mike Frysinger wrote:
> > i was going through the new features list in NEWS to see what cool things
> > are in here and i saw the new checkjobs option. is it just me or does
> > this cause a non-login bash to crash at exit which leads to an infinite
> > loop / cpu churning ?
>
> I can't reproduce this. Do you have a trap set on EXIT?
ok, here's the odd thing i was able to reduce things down to:
$ gdb --args ./bash --norc
(gdb) r
Starting program: /home/vapier/bash-4.0/bash --norc
bash-4.0$ . ~/.profile.d/screen.sh
No Sockets found in /var/run/screen/S-vapier.
bash-4.0$ shopt -s checkjobs
bash-4.0$ exit
Program received signal SIGSEGV, Segmentation fault.
0x00000000004819e9 in exit_or_logout (list=0x0) at ./exit.def:116
116 else if (check_jobs_at_exit && stopmsg == 0 && RUNNING (i))
(gdb) bt
#0 0x00000000004819e9 in exit_or_logout (list=0x0) at ./exit.def:116
#1 0x00000000004818c6 in exit_builtin (list=0x0) at ./exit.def:69
#2 0x000000000042c946 in handle_eof_input_unit () at
/Users/chet/src/bash/src/parse.y:5299
#3 0x0000000000421fa6 in yyparse () at /Users/chet/src/bash/src/parse.y:409
#4 0x000000000042194c in parse_command () at eval.c:228
#5 0x0000000000421a27 in read_command () at eval.c:272
#6 0x000000000042173c in reader_loop () at eval.c:137
#7 0x000000000041f60d in main (argc=0x2, argv=0x7fff45518648,
env=0x7fff45518660) at shell.c:741
this is a vanilla bash-4.0.tar.gz unpacked and run `./configure && make` ...
in this case, i changed my CFLAGS to '-O0 -g -ggdb' to get a slightly more
detailed backtrace. this is on x86_64/gcc-4.3.3 btw ...
the screen.sh file in question looks like this:
$ cat ~/.profile.d/screen.sh
if [[ $- == *i* ]] ; then
[ "${TERM}" != "dumb" ] && screen -li
fi
-mike
signature.asc
Description: This is a digitally signed message part.