Subject: Re: [ksh93-integration-discuss] CR 6782948 Updated P2 shell/korn93 *ksh93* signal handling is broken --------
> *Synopsis*: *ksh93* signal handling is broken > > CR 6782948 changed on Jan 17 2009 by <User 1-5Q-5151> > > === Field ============ === New Value ============= === Old Value ============= > > Evaluation New Note > Status 3-Accepted 1-Dispatched > Synopsis *ksh93* signal handling i.. ksh93 signal handling is .. > ====================== =========================== =========================== > > > *Change Request ID*: 6782948 > > *Synopsis*: *ksh93* signal handling is broken > > Product: solaris > Category: shell > Subcategory: korn93 > Type: Defect > Subtype: > Status: 3-Accepted > Substatus: > Priority: 2-High > Introduced In Release: solaris_nevada > Introduced In Build: > Responsible Engineer: > Keywords: > > === *Description* ============================================================ > i'm currently running opensolaris snv_99. > i noticed some of my shell script hanging when running in ksh93. > the problem seems to be centered around signal trap and child handling > within ksh93. i managed to boil my scripts down to an easily reproducible > test case. > > you can reproduce the problem by running the following script: > ---8<--- > #!/bin/ksh > > foo() { exit 0; } > trap foo EXIT > > /bin/yes | while read yes; do > (/bin/date) > done > > ---8<--- > > then in another window run the following command: > ---8<--- > while :; do kill -WINCH <script pid>; done > ---8<--- > > this will quickly result in a failure. i've seen the shell > process emit error messages, hard hang (requiring a kill -9), > and/or core dump. > This is a bug. Sending SIGWINCH to a process should not cause a core dump and it should not kill the process. The default action for SIGWINCH for a non-interactive shell is to ignore the signal. However, signals such as TERM (and many others whose default action is to terminate the process) should kill this loop and it wasn't This is another bug. Both of these fixes will be in the next update. David Korn dgk at research.att.com