* Small problem with suspend-a-loop patch (6707)
@ 1999-06-19 5:35 Bart Schaefer
0 siblings, 0 replies; 3+ messages in thread
From: Bart Schaefer @ 1999-06-19 5:35 UTC (permalink / raw)
To: zsh-workers
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.
zagzig<12> repeat 5
repeat> sleep 20
zsh: 8811 suspended repeat 5; do; sleep 20; done
zagzig<13> fg
[1] suspended repeat 5; do; sleep 20; done
zsh: 8811 suspended repeat 5; do; sleep 20; done
zagzig<14> fg
[1] + continued repeat 5; do; sleep 20; done
zsh: 8811 suspended repeat 5; do; sleep 20; done
zagzig<14> fg
[1] + continued repeat 5; do; sleep 20; done
zsh: 8811 suspended repeat 5; do; sleep 20; done
zagzig<14> fg
[1] + continued repeat 5; do; sleep 20; done
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Small problem with suspend-a-loop patch (6707)
1999-06-21 11:20 Sven Wischnowsky
@ 1999-06-21 15:47 ` Peter Stephenson
0 siblings, 0 replies; 3+ messages in thread
From: Peter Stephenson @ 1999-06-21 15:47 UTC (permalink / raw)
To: zsh-workers
Sven Wischnowsky wrote:
> Bart Schaefer wrote:
>
> > The first time a loop is suspended and then brought back into the foregroun
> d,
> > 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).
This has fixed another problem that if you put a foreground process into
the background it wasn't reported when it exited.
--
Peter Stephenson <pws@ibmth.df.unipi.it> Tel: +39 050 844536
WWW: http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Small problem with suspend-a-loop patch (6707)
@ 1999-06-21 11:20 Sven Wischnowsky
1999-06-21 15:47 ` Peter Stephenson
0 siblings, 1 reply; 3+ messages in thread
From: Sven Wischnowsky @ 1999-06-21 11:20 UTC (permalink / raw)
To: zsh-workers
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@informatik.hu-berlin.de
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1999-06-21 16:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-06-19 5:35 Small problem with suspend-a-loop patch (6707) Bart Schaefer
1999-06-21 11:20 Sven Wischnowsky
1999-06-21 15:47 ` Peter Stephenson
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).