| Constantine,
I tried your reproducer on Digital UNIX 4.0 and found it doesn't kill the parent process. I posted your
reproducer on Digital's threads conference thinking it may have been a bug in 3.2c. However, based on the reply,
it looks more like an issue with POSIX compliance. Version 3.2c of Digital UNIX is not POSIX compliant whereas
4.0 is.
It looks like you already have the workaround suggested here in your reproducer.
Here is the reply I received back:
----------------------------------------------------------------------------
You're misinterpreting what's happening. What you're doing (by calling
sigignore) is NOT setting the signal mask -- it's setting the signal ACTION
(to SIG_IGN).
In POSIX (and therefore in Digital UNIX 4.0), all threads share a common
process action for each signal. And therefore, all threads have SIGPIPE set
to SIG_IGN, and ignore the broken pipe. Prior to Digital UNIX 4.0, each
thread had its own private handler for the "synchronous" signal actions,
which happens to include SIGPIPE. Signal actions were not inherited. You can
work around that by having each thread call sigignore(), for example, before
doing any I/O.
---------------------------------------------------------------------------
Let us know if this helps.
Pat Bryant
Alpha Developer Support
|