Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Small problem with suspend-a-loop patch (6707)
- X-seq: zsh-workers 6755
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: Small problem with suspend-a-loop patch (6707)
- Date: Mon, 21 Jun 1999 13:20:10 +0200 (MET DST)
- In-reply-to: "Bart Schaefer"'s message of Sat, 19 Jun 1999 05:35:03 +0000
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Bart Schaefer wrote:
> The first time a loop is suspended and then brought back into the foreground,
> the job status is reported incorrectly; every time thereafter it's correct.
Oh. there was this explicit test to avoid setting the status of the
last process of a super-job to SP_RUNNING (the last process is the
shell forked for the tail of a pipeline).
I don't remember why we had this test, so I only #if'ed it out for
now. Stopping/continuing loops with and without pipes seems to
reported the status correclty with that, but please look out for wrong
reports everyone.
Bye
Sven
--- os/jobs.c Mon Jun 21 12:49:40 1999
+++ Src/jobs.c Mon Jun 21 13:13:34 1999
@@ -92,8 +92,12 @@
jn->stat &= ~STAT_STOPPED;
for (pn = jn->procs; pn; pn = pn->next)
+#if 0
if (WIFSTOPPED(pn->status) &&
(!(jn->stat & STAT_SUPERJOB) || pn->next))
+ pn->status = SP_RUNNING;
+#endif
+ if (WIFSTOPPED(pn->status))
pn->status = SP_RUNNING;
if (jn->stat & STAT_SUPERJOB)
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author