i run this script:
#!/usr/bin/scsh -s
!#
;; test
(display "start test\n")
(run (sleep 5s))
(display "ok\n")
now i press C-z (i'm in zsh), and with "fg" i resume the process. But (if SLEEP was
running), the process does not finish.
Can anybody else see it ?
i think it's 0.6.2.
when i run PS i get:
after C-z:
5714 0.0 0.0 1592 528 pts/162 TN 14:11 0:00 sleep 5s
after fg:
5714 0.0 0.0 0 0 pts/162 ZN 14:11 0:00 [sleep <defunct>]
> i run this script:
>
> #!/usr/bin/scsh -s
> !#
> ;; test
> (display "start test\n")
> (run (sleep 5s))
> (display "ok\n")
>
>
>
>
> now i press C-z (i'm in zsh), and with "fg" i resume the process. But (if SLEEP was
> running), the process does not finish.
>
> Can anybody else see it ?
I see it with bash gnu/linux 2.2.13, scsh-0.6.2.
Chris
I see it with both zsh-4.0.4 and /bin/sh (which happens to be
KSH_VERSION='@(#)PD KSH v5.2.14 99/07/13.2') under OpenBSD-3.1.
I'm using scsh built from the latest CVS sources.
The weirdest part is that if you stop it, then type fg in a VERY
short time, it seems to do the right thing. If you leave it stopped
for a few whole seconds, then fg it, it just sits there.
-Chad
Chad> On Mon, Jun 03, 2002 at 11:04:16AM -0400, Chris Beggy wrote:
>> m...@maruska.dyndns.org (Michal Maruška) writes:
>>
>> > i run this script:
>> >
>> > #!/usr/bin/scsh -s
>> > !#
>> > ;; test
>> > (display "start test\n")
>> > (run (sleep 5s))
>> > (display "ok\n")
>> >
>> >
>> >
>> >
>> > now i press C-z (i'm in zsh), and with "fg" i resume the process. But (if SLEEP was
>> > running), the process does not finish.
>> >
>> > Can anybody else see it ?
>>
>> I see it with bash gnu/linux 2.2.13, scsh-0.6.2.
>>
Chad> I see it with both zsh-4.0.4 and /bin/sh (which happens to be
Chad> KSH_VERSION='@(#)PD KSH v5.2.14 99/07/13.2') under OpenBSD-3.1.
Chad> I'm using scsh built from the latest CVS sources.
Chad> The weirdest part is that if you stop it, then type fg in a VERY
Chad> short time, it seems to do the right thing. If you leave it stopped
Chad> for a few whole seconds, then fg it, it just sits there.
After the "fg" scsh receives a SIGCONT and a SIGCHLD within a very
short time. Due to a bug in the VM, the SIGCHLD is dropped and scsh
will continue to wait for its child to terminate. I fixed this in CVS.
Thanks for the reports!
--
Martin