Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: killing suspended jobs makes zsh hang after 47d1215
- X-seq: zsh-workers 29475
- From: Pan Tsu <inyaoo@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: killing suspended jobs makes zsh hang after 47d1215
- Date: Mon, 13 Jun 2011 04:02:43 +0400
- Cc: zsh-workers@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=eLEd9J+aMtFzxX6sHvWw3yE1gJIInSuH2HzoR+yUdDk=; b=xt2pxMc9g6VdY/flq6l2TCgO6IhYdJB1p4G8FuoPCjMxrqhd7yrcYiCcD4cSgeuPHx 8JLiTQdh8YmBcNjG63LJHssYqIVAy5wCt1QRYYqizuKyno05FhKJZqYxp8Dupk9rTdkw kuGJQygYO3rDtZWQBK04pkkKPjVc7Wo/9wlPM=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; b=lM4hUwWCrOoH3vvWkMyjvP7kC8268datVufVsEDIId93ODb+YvTUNzRwutrCA00cQe NgDNUacryHUGZSlRyaJmtXZKknV7guzMZrtAmMIBNP3QSod4tTCcuLeFxYgGWWYlMjHT UWYPq5+JaoDUTVuDrjNjQC2apl3WbmoJHhR30=
- In-reply-to: <110612075958.ZM27334@torch.brasslantern.com> (Bart Schaefer's message of "Sun, 12 Jun 2011 07:59:57 -0700")
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <86aadnwtl2.fsf@gmail.com> <110612072211.ZM26399@torch.brasslantern.com> <110612075958.ZM27334@torch.brasslantern.com>
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> writes:
> On Jun 12, 7:22am, Bart Schaefer wrote:
> }
> } ----------------------------
> } revision 1.80
> } date: 2011/04/01 11:02:16; author: pws; state: Exp; lines: +18 -1
> } Stef van Vlierberghe: 28965 (as posted in 28967):
> } findproc() should not return processes not marked as SP_RUNNING
> } ----------------------------
> }
> } Evidently there are in fact cases where we need to find jobs that are
> } not running.
>
> The specific bug is fixed by the patch below, but I wonder if there are
> other job status that need to be tested here as well.
After playing a bit more with pn->status...
% cat | cat &
[1] 91580 97756
[1] + suspended (tty input) cat | cat
% %
[1] + continued cat | cat
^C
load: 0.06 no foreground process group
or when less(1) in `cat /dev/random | less' pipeline exits before
cat(1) is done
Breakpoint 1, findproc (pid=97756, jptr=0x7fffffff4c08, pptr=0x7fffffff4c00, aux=0) at jobs.c:192
192 if (pn->pid == pid && pn->status == SP_RUNNING) {
(gdb) p pn->status
$1 = 19
(gdb) p WIFSIGNALED(pn->status)
$2 = 1
(gdb) bt
#0 findproc (pid=97756, jptr=0x7fffffff4c08, pptr=0x7fffffff4c00, aux=0) at jobs.c:192
#1 0x000000000047d83c in wait_for_processes () at signals.c:493
#2 0x000000000047d9f4 in zhandler (sig=20) at signals.c:584
#3 0x00007ffffffff003 in ?? ()
#4 0x000000000047d900 in wait_for_processes () at signals.c:524
#5 0x00000000004481e8 in zwaitjob (job=1, wait_cmd=0) at jobs.c:1317
#6 0x0000000000448390 in waitjobs () at jobs.c:1362
#7 0x000000000044a1d9 in bin_fg (name=0x80f318738 "fg", argv=0x7fffffff52c0, ops=0x7fffffff5390, func=2) at jobs.c:2058
#8 0x000000000040ed73 in execbuiltin (args=0x80f318700, bn=0x6af3c0) at builtin.c:450
#9 0x000000000042ab5d in execcmd (state=0x7fffffff59a0, input=0, output=0, how=2, last1=2) at exec.c:3182
#10 0x00000000004265a0 in execpline2 (state=0x7fffffff59a0, pcode=195, how=18, input=0, output=0, last1=0) at exec.c:1640
#11 0x0000000000425aef in execpline (state=0x7fffffff59a0, slcode=3074, how=18, last1=0) at exec.c:1424
#12 0x000000000042531e in execlist (state=0x7fffffff59a0, dont_change_job=0, exiting=0) at exec.c:1207
#13 0x0000000000424d63 in execode (p=0x80f318660, dont_change_job=0, exiting=0, context=0x49b217 "toplevel") at exec.c:1028
#14 0x00000000004412f3 in loop (toplevel=1, justonce=0) at init.c:185
#15 0x000000000044431d in zsh_main (argc=2, argv=0x7fffffff5b00) at init.c:1528
#16 0x000000000040e12b in main (argc=2, argv=0x7fffffff5b00) at ./main.c:93
Messages sorted by:
Reverse Date,
Date,
Thread,
Author