Bug 149283

Summary: AT&T ksh does not propagate SIGHUP
Product: Red Hat Enterprise Linux 3 Reporter: Kurtis D. Rader <krader>
Component: kshAssignee: Karsten Hopp <karsten>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0CC: pknirsch
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2005-404 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-09-28 17:13:13 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 156320    

Description Kurtis D. Rader 2005-02-21 22:39:48 UTC
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):
ksh-20040229-8

How reproducible:
Always

Steps to Reproduce:
1. ssh to the system
2. exec /bin/ksh
3. /usr/bin/top
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.

Additional info:

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.

Comment 5 Red Hat Bugzilla 2005-09-28 17:13:13 UTC
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.

http://rhn.redhat.com/errata/RHBA-2005-404.html