Email List: Xaustin-group-lX
[All Lists]

Re: RE: Re: set -e and SIGCHLD

To: David Korn <yyy@xxxxxxxxxxxxxxxx>
Subject: Re: RE: Re: set -e and SIGCHLD
From: Marc Aurele La France <yyy@xxxxxxxxxxx>
Date: Tue, 13 Mar 2001 13:43:25 -0700 (MST)
Cc: yyyyyyyyyyyyyy@xxxxxxxxxxxxx, yyyyy@xxxxxxxxxxxxxxxxxxx
On Tue, 13 Mar 2001, David Korn wrote:

> > > To my way of thinking, the solution is clear:  have conforming exec()
> > > implementations >always< reset SIGC[H]LD dispositions to SIG_DFL, and 
> > > SA_NOCLDWAIT to zero.  This is the only technically sound solution.

> This would violate the standard.

That's the point.  The standard is wrong.

> If I do signal(SIGCHLD,SIG_IGN)
> before the exec, then in the child signal(SIGCHLD,...) must return
> SIG_IGN according to the standard.

To what end?

> However, the implementation
> can treat SIG_IGN as if it were SIG_DFL.

How?  According to the standard, the implementation cannot distinguish
between an inherited SIGC[H]CLD disposition and one that is explicitly 
set.

> The standard seems to be silent as to whether SA_NOCLDWAIT is set
> in the new process or not.

True.  I see this as a symptom of the original (just-before-POSIX)
oversight.

> > One other option tho: an environment variable a la LD_RUN_PATH et al.:

> >   export INHERIT_SIGCHLD_IGNORE=true

> > for anyone that really, really wants this incomprehensible
> > functionality.

> I don't think that environment variables should effect the behavior
> of system calls. 

I agree whole-heartedly.  This is >not< an application layer issue (as an
environment variable (and POSIX) would imply).

Marc.

+----------------------------------+-----------------------------------+
|  Marc Aurele La France           |  work:   1-780-492-9310           |
|  Computing and Network Services  |  fax:    1-780-492-1729           |
|  352 General Services Building   |  email:  yyy@xxxxxxxxxxx          |
|  University of Alberta           +-----------------------------------+
|  Edmonton, Alberta               |                                   |
|  T6G 2H1                         |     Standard disclaimers apply    |
|  CANADA                          |                                   |
+----------------------------------+-----------------------------------+
XFree86 Core Team member.  ATI driver and X server internals.

<Prev in Thread] Current Thread [Next in Thread>