[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[can't 'wait' on a stopped job]
From: |
J.Smith |
Subject: |
[can't 'wait' on a stopped job] |
Date: |
Sat, 7 Apr 2001 21:02:40 +0200 |
Configuration Information [Automatically generated, do not change]:
Machine: i586
OS: linux-gnu
Compiler: gcc
Compilation
CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i586' -DCONF_OSTYPE='linux-gnu' -
DCONF_MACHTYPE='i586-mandrake-linux-gnu' -DCONF_VENDOR='mandrake' -DSHELL -D
HAVE_CONFIG_H -D_FILE_OFFSET_BITS=64 -I. -I/usr/include -I. -I./include -I
./lib -I/usr/include -O3 -fomit-frame-pointer -pipe -s -march=pentium -ffast
-math -fexpensive-optimizations
uname output: Linux myhome.home.net 2.2.17-21mdk #1 Thu Oct 5 13:16:08 CEST
2000 i686 unknown
Machine Type: i586-mandrake-linux-gnu
Bash Version: 2.04
Patch Level: 12
Release Status: release
Description:
The builtin 'wait' seems to misbehave, when you try to wait on a stopped
job. In ksh99, we are able to 'wait' on both a running and on a 'stopped'
job. In bash, I sometimes get an error when I try to wait on a stopped job,
after which wait returns. Or (even worse) 'wait' returns '0' immediatly when
waiting on stopped job. The problem is that we can't 'wait' on a stopped job
in bash, but we can in (at least) ksh99. We should be able to wait on a
stopped job in bash as well.
Repeat-By:
First, we start a job in the background.
# ls -alR >/dev/null 2>&1 &
Then we stop it by sending a SIGSTOP signal using the 'kill' command
# kill -STOP PID-of-ls
Then we execute the 'wait' command.
# wait PID-of-ls
Now we might get a warning, saying that the job is stopped, and wait returns
immediatly. Or we get no warning at all, and wait returns immediatly. We
should be able to wait on a stopped job as well. In bash, this is not
possible.
- [can't 'wait' on a stopped job],
J.Smith <=