linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* sigaction.2: clarification for SA_NODEFER needed
@ 2020-11-11  0:42 Heinrich Schuchardt
  2020-11-12 15:37 ` Michael Kerrisk (man-pages)
  0 siblings, 1 reply; 14+ messages in thread
From: Heinrich Schuchardt @ 2020-11-11  0:42 UTC (permalink / raw)
  To: linux-man, Michael Kerrisk

Hello Michael,

I have been writing a handler for SIGILL and SIGSEGV which restarts the
program using execv() if an exception occurs. The handler never returns.

From the description of SA_NODEFER it was not evident that even if the
process is restarted with execv() the signal remains masked if
SA_NODEFER is not set as a flag.

It think this behavior deserves mentioning on the sigaction.2 manpage, e.g.

"Do not prevent the signal from being received from within its own
signal handler. A signal handler call is not terminated by calling
execv() as the pending signal property is inherited by the new process."

On the signal.7 manpage there is a paragraph "Signal mask and pending
signals". Here pending signals are mentioned. There is a sentence
"Between the time when it is generated and when it is delivered a signal
is said to be pending."

To me "delivered" means the instance when the signal handler is called
and not the instance when the signal handler returns. So said sentence
should be reworked, e.g.

"Between the time when it is generated and when the signal handler
returns a signal is said to be pending."

Best regards

Heinrich

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2020-11-17 18:41 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-11  0:42 sigaction.2: clarification for SA_NODEFER needed Heinrich Schuchardt
2020-11-12 15:37 ` Michael Kerrisk (man-pages)
2020-11-12 16:25   ` Heinrich Schuchardt
2020-11-12 20:45     ` Michael Kerrisk (man-pages)
2020-11-12 20:57       ` Heinrich Schuchardt
2020-11-12 21:01         ` Michael Kerrisk (man-pages)
2020-11-12 21:04           ` Heinrich Schuchardt
2020-11-12 21:17             ` Michael Kerrisk (man-pages)
2020-11-16 13:29             ` Dave Martin
2020-11-16 13:21         ` Dave Martin
2020-11-17 10:46           ` Michael Kerrisk (man-pages)
2020-11-17 12:05             ` Dave Martin
2020-11-17 17:09               ` Michael Kerrisk (man-pages)
2020-11-17 18:40                 ` Dave Martin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).