Red Hat Bugzilla – Bug 149283
AT&T ksh does not propagate SIGHUP
Last modified: 2007-11-30 17:07:06 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; rv:1.7.3) Gecko/20041002 Firefox/0.10.1
Description of problem:
The pdksh properly propagates SIGHUP to the foreground process group. The AT&T ksh does not.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. ssh to the system
2. exec /bin/ksh
4. "kill -1" the original ssh client
Actual Results: The ksh and top processes continue running.
Expected Results: The ksh process should propagate SIGHUP to the top process then terminate.
Bug also exists in the RHEL 4 ksh-20040229-12.i386.rpm package.
A strace shows that upon receipt of SIGHUP from the sshd process ksh sends a SIGCONT to the foreground process group. It then calls waitpid(-1,,WUNTRACED). Since the status of the foreground process doesn't change the waitpid() doesn't return.
FWIW, the AT&T ksh which ships with DYNIX/ptx simply propagates the SIGHUP to the foreground process group (like pdksh does) then terminates itself by setting SIGHUP to SIG_DFL then sending itself another SIGHUP.
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.