signal(7) fixes
v2 cover signal(7) fixes
This is a follow-up to the following, or any subsequent versions of it:
https://lore.kernel.org/all/[email protected]/
This patchset brings distinction between the set of blocked signals stored in uc_sigmask, and the actual set of blocked signals. Also, fix a wrong mention of sigprocmask(), and replace it with sigaction().
Changes in v2:
- Make the description clear and concise
- Use semantic newlines
Dev Jain (2):
signal.7: Clearly describe ucontext kernel dump to userspace signal.7: Fix wrong mention of sigprocmask
man/man7/signal.7 | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
Signature · 1 line
2.34.1
PATCH v2 1/2 signal.7: Clearly describe ucontext kernel dump to userspace
The set of blocked signals is updated from struct sigaction after the kernel dumps ucontext. Mention this to avoid misunderstanding.
--- man/man7/signal.7 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
man/man7/signal.7 +7 -1
@@ -282,7 +282,13 @@ the thread's alternate signal stack settings. .B SA_SIGINFO flag, then the above information is accessible via the .I ucontext_t -object that is pointed to by the third argument of the signal handler.) +object that is pointed to by the third argument of the signal handler. +This object reflects the state at which the signal is delivered, rather +than in the handler; +for example, the mask of blocked signals stored in this object will not +contain the mask of new signals blocked through +.BR sigaction(2)). + .IP (1.4) Any signals specified in .I act\->sa_mask
Signature · 1 line
2.34.1
Alejandro Colomar
maintainerRe: [PATCH v2 1/2] signal.7: Clearly describe ucontext kernel dump to userspace
Quoted 4 lines · Dev Jain
The set of blocked signals is updated from struct sigaction after the kernel dumps ucontext. Mention this to avoid misunderstanding.
Signed-off-by Dev Jain <[email protected]>
Hi Dev,
I've applied this patch, with some minor tweaks:
<https://www.alejandro-colomar.es/src/alx/linux/man-pages/man-pages.git/commit/?h=contrib&id=9e1f221b2099ee2c936ce4d6562a61e1e253af47>
Have a lovely day!
Alex
Quoted 27 lines
--- man/man7/signal.7 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)man/man7/signal.7 +7
-1@@ -282,7 +282,13 @@ the thread's alternate signal stack settings. .B SA_SIGINFO flag, then the above information is accessible via the .I ucontext_t -object that is pointed to by the third argument of the signal handler.) +object that is pointed to by the third argument of the signal handler. +This object reflects the state at which the signal is delivered, rather +than in the handler; +for example, the mask of blocked signals stored in this object will not +contain the mask of new signals blocked through +.BR sigaction(2)). + .IP (1.4) Any signals specified in .I act\->sa_maskSignature · 1 line
2.34.1
Signature · 1 line
<https://www.alejandro-colomar.es/>
Alejandro Colomar
maintainerRe: [PATCH v2 1/2] signal.7: Clearly describe ucontext kernel dump to userspace
Quoted 10 lines · Alejandro Colomar
Quoted 4 lines · Dev Jain
The set of blocked signals is updated from struct sigaction after the kernel dumps ucontext. Mention this to avoid misunderstanding.
Signed-off-by Dev Jain <[email protected]>Hi Dev,
I've applied this patch, with some minor tweaks:
<https://www.alejandro-colomar.es/src/alx/linux/man-pages/man-pages.git/commit/?h=contrib&id=9e1f221b2099ee2c936ce4d6562a61e1e253af47>
Whoops; I found another issue, and amended:
<https://www.alejandro-colomar.es/src/alx/linux/man-pages/man-pages.git/commit/?h=contrib&id=b8136d84eb3b9b1db0dd6f54f47c1c104682f44f>
Quoted 34 lines
Have a lovely day!
AlexQuoted 27 lines
--- man/man7/signal.7 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)man/man7/signal.7 +7
-1@@ -282,7 +282,13 @@ the thread's alternate signal stack settings. .B SA_SIGINFO flag, then the above information is accessible via the .I ucontext_t -object that is pointed to by the third argument of the signal handler.) +object that is pointed to by the third argument of the signal handler. +This object reflects the state at which the signal is delivered, rather +than in the handler; +for example, the mask of blocked signals stored in this object will not +contain the mask of new signals blocked through +.BR sigaction(2)). + .IP (1.4) Any signals specified in .I act\->sa_maskSignature · 1 line
2.34.1Signature · 1 line
<https://www.alejandro-colomar.es/>
Signature · 1 line
<https://www.alejandro-colomar.es/>
PATCH v2 2/2 signal.7: Fix wrong mention of sigprocmask
In reply to Dev JainThe handler is registered with sigaction(), not sigprocmask(). Even if the purpose of writing sigprocmask() here was to mention blocked signals, the statement currently concerns the "addition" of blocked signals; signals blocked through sigprocmask() would already be present in the thread context of blocked signals.
--- man/man7/signal.7 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
man/man7/signal.7 +1 -1
@@ -293,7 +293,7 @@ contain the mask of new signals blocked through Any signals specified in .I act\->sa_mask when registering the handler with -.BR sigprocmask (2) +.BR sigaction (2) are added to the thread's signal mask. The signal being delivered is also added to the signal mask, unless
Signature · 1 line
2.34.1
Re: [PATCH v2 2/2] signal.7: Fix wrong mention of sigprocmask
Quoted 5 lines · Dev Jain
The handler is registered with
sigaction(), notsigprocmask(). Even if the purpose of writingsigprocmask()here was to mention blocked signals, the statement currently concerns the "addition" of blocked signals; signals blocked throughsigprocmask()would already be present in the thread context of blocked signals.
Alejandro Colomar
maintainerRe: [PATCH v2 2/2] signal.7: Fix wrong mention of sigprocmask
Hi Dev, Mark,
Quoted 8 lines · Mark Brown
Quoted 5 lines · Dev Jain
The handler is registered with
sigaction(), notsigprocmask(). Even if the purpose of writingsigprocmask()here was to mention blocked signals, the statement currently concerns the "addition" of blocked signals; signals blocked throughsigprocmask()would already be present in the thread context of blocked signals.Reviewed-by Mark Brown <[email protected]>
Thanks for the patch and the review! I've applied the patch. It will be included in the man-pages-6.9.1 release later today.
Have a lovely day!
Alex
Signature · 1 line
<https://www.alejandro-colomar.es/>