lkml.org 
[lkml]   [2005]   [Aug]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Signal handling possibly wrong
> * Steven Rostedt (rostedt@goodmis.org) wrote:
> > Where, sa_mask is _ignored_ if NODEFER is set. (I now have woken up!).
> > The attached program shows that the sa_mask is indeed ignored when
> > SA_NODEFER is set.
> >
> > Now the real question is... Is this a bug?
>
> That's not correct w.r.t. SUSv3. sa_mask should be always used and
> SA_NODEFER is just whether or not to add that signal in.

Yes.

> SA_NODEFER
> [XSI] If set and sig is caught, sig shall not be added to the
> thread's
> signal mask on entry to the signal handler unless it is included in
> sa_mask. Otherwise, sig shall always be added to the thread's signal
> mask on entry to the signal handler.

It's amazing that this non-conformance was never spotted before.
It seems to go all the way back to kernel 1.0 (when the flag
was known as SA_NOMASK).

I'll get something into the manual pages under BUGS.

Cheers,

Michael

--
Michael Kerrisk
maintainer of Linux man pages Sections 2, 3, 4, 5, and 7

Want to help with man page maintenance? Grab the latest
tarball at ftp://ftp.win.tue.nl/pub/linux-local/manpages/
and grep the source files for 'FIXME'.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-08-10 18:25    [W:0.238 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site