Here's the scenario (single-threaded, multi-threaded doesn't matter)
# kill -STOP pid
# egrep "^State|^SigPnd|^ShdPnd" /proc/pid/status
State: T (stopped)
SigPnd: 0000000000000000
ShdPnd: 0000000000000000
The following command sends a signal to the specified thread ID using the
tkill(2) syscall interface
# tkill -ALRM pid (Or any other signal other than SIGCONT or SIGKILL)
# egrep "^State|^SigPnd|^ShdPnd" /proc/pid/status
State: T (stopped)
SigPnd: 0000000000002000 [ SIGALRM pending ]
ShdPnd: 0000000000000000
# kill -ABRT pid
# egrep "^State|^SigPnd|^ShdPnd" /proc/pid/status
State: T (stopped)
SigPnd: 0000000000002000 [ SIGALRM pending ]
ShdPnd: 0000000000000020 [ SIGABRT pending ]
# kill -KILL pid
# egrep "^State|^SigPnd|^ShdPnd" /proc/pid/status
State: T (stopped)
SigPnd: 0000000000002000 [ SIGALRM pending ]
ShdPnd: 0000000000000120 [ SIGABRT and SIGKILL pending ]
EGAD! SIGKILL should have whacked the pid, no matter what.
Here's a patch that fixes this.
Thanks!
- Bhavesh
Bhavesh P. Davda | Distinguished Member of Technical Staff | Avaya |
1300 West 120th Avenue | B3-B03 | Westminster, CO 80234 | U.S.A. |
Voice/Fax: 303.538.4438 | [email protected]