bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bash-4.0 and checkjobs w/non-login shell


From: Chet Ramey
Subject: Re: bash-4.0 and checkjobs w/non-login shell
Date: Mon, 23 Feb 2009 23:00:31 -0500
User-agent: Thunderbird 2.0.0.19 (Macintosh/20081209)

Mike Frysinger wrote:
> 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))

Well, that was it.  Try the attached patch.

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer

Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/
*** ../bash-4.0/builtins/exit.def       2009-01-04 14:32:22.000000000 -0500
--- builtins/exit.def   2009-02-23 22:56:58.000000000 -0500
***************
*** 114,118 ****
        if (jobs[i] && STOPPED (i))
          stopmsg = JSTOPPED;
!       else if (check_jobs_at_exit && stopmsg == 0 && RUNNING (i))
          stopmsg = JRUNNING;
  
--- 114,118 ----
        if (jobs[i] && STOPPED (i))
          stopmsg = JSTOPPED;
!       else if (check_jobs_at_exit && stopmsg == 0 && jobs[i] && RUNNING (i))
          stopmsg = JRUNNING;
  

reply via email to

[Prev in Thread] Current Thread [Next in Thread]