[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[jobs doesnt report status correctly on kill -CONT
From: |
J.Smith |
Subject: |
[jobs doesnt report status correctly on kill -CONT |
Date: |
Sat, 7 Apr 2001 20:52:12 +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:
There seems to be a problem with the 'jobs' command. It doesnt report the
status of a job correctly when you send a background job a SIGSTOP signal,
followed by a SIGCONT signal using the kill command. If I start a job in the
background, using the '&' at the end, and then issue a kill -STOP followed
by a kill -CONT, 'jobs' *still* reports the job as being stopped, even
though in reality it is actually running again.
As a side-effect, this also makes the builtin 'wait' misbehave, when you try
to wait on a really 'running' job that 'jobs' reports as 'stopped'.
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
Now when we execute the builtin 'jobs',
#jobs
jobs correctly reports the job as 'stopped'
Next, we resume the job sending it a SIGCONT signal using the 'kill' command
# kill -CONT PID-of-ls
Now when we execute the builtin 'jobs',
# jobs
jobs incorrectly still reports the job as being 'stopped', even though in
reality it is actually running again, as we can prove by running 'ps'.
- [jobs doesnt report status correctly on kill -CONT,
J.Smith <=