> Date: Tue, 30 Sep 2008 21:04:52 -0700 > From: "Garrett D'Amore" <gdamore at sun.com> > Subject: Re: PSARC/2008/617 - posix_spawn extension - setsigignore > To: "Roger A. Faulkner" <Roger.Faulkner at sun.com> > Cc: psarc-ext at sac.sfbay.sun.com, Sumanth.Naropanth at sun.com, Bart.Smaalders at sun.com, Darrin.Johnson at sun.com > > Q: Has there been any activity (that you're aware of) to amend the > standard to support this kind of functionality? Is this something that > our representative(s) with the POSIX group should be proposing for the > next revision of the standard? > > -- Garrett
Garrett: There has been no such activity as far as I know. The SUSv4 specification has just been approved and it contains nothing about this in the posix_spawn() specification. Don: (Sorry, I should have Cc'd you on the original PSARC mail, shown below.) Do you know of any such discussions by the Posix folks? Do you think it's something we should propose to Posix for the future? Thanks, Roger > Roger A. Faulkner wrote: > > I am sponsoring this automatic-approval case for myself. > > > > The proposal in this case is to extend the posix_spawn() > > functionality by adding the ability to specify a set of > > signals that are to be ignored in the created child process. > > > > The Posix specification for posix_spawn() already provides a way to set > > the child's signal handlers to SIG_DFL via the POSIX_SPAWN_SETSIGDEF > > flag to posix_spawnattr_setflags() plus the functions: > > posix_spawnattr_setsigdefault() > > posix_spawnattr_getsigdefault() > > > > However, it provides no way to set the child's signal actions to SIG_IGN > > other than having them inherited from the calling process. It is not > > thread-safe for one thread of a process to change signal actions > > for this purpose, even if the actions are changed back immediately > > following the call to posix_spawn(). > > > > What is needed is a way to set the child's signal handlers to SIG_IGN > > via a POSIX_SPAWN_SETSIGIGN_NP flag to posix_spawnattr_setflags() plus > > new functions: > > posix_spawnattr_setsigignore_np() > > posix_spawnattr_getsigignore_np() > > > > (The _NP and _np appendages are for non-portable Solaris extensions.) > > > > The old and new posix_spawn(3C) manual pages are in the materials > > directory, along with the new manual page for the new functions: > > posix_spawnattr_getsigignore_np.3c > > > > The proposed commitment level of these new interfaces is Committed. > > > > The proposed release binding is "minor release" so they can go > > into SunOS 5.11 (there is no need or intention to back-port the > > interfaces to SunOS 5.10). > > > > Roger Faulkner