Skip to contentSkip to conversation

sigalstack.2: Mention the need for separate signal stacks for threads

PATCH In review Florian Weimer 2 participants 2 messages May 18, 2021 – May 21, 2021 Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sigalstack.2: Mention the need for separate signal stacks for threads

---
 man2/sigaltstack.2 | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
man2/sigaltstack.2 +5 -2
index 53268ccbe..1510a98ab 100644
@@ -54,7 +54,10 @@ alternate signal stack.
 An alternate signal stack is used during the
 execution of a signal handler if the establishment of that handler (see
 .BR sigaction (2))
-requested it.
+requested it using the
+.B SA_ONSTACK
+flag.  Each thread that can execute such signal handlers needs its own
+separate alternate signal stack.
 .PP
 The normal sequence of events for using an alternate signal stack
 is the following:
@@ -67,7 +70,7 @@ signal stack.
 Use
 .BR sigaltstack ()
 to inform the system of the existence and
-location of the alternate signal stack.
+location of the alternate signal stack for the current thread.
 .TP
 3.
 When establishing a signal handler using
#1 lore raw

[CC += mtk]

Hi Florian,

Quoted 2 lines · Florian Weimer

I don't understand how this works, so I'll CC Michael so that he merges it.

Thanks,

Alex

Quoted 30 lines
---
  man2/sigaltstack.2 | 7 +++++--
  1 file changed, 5 insertions(+), 2 deletions(-)
man2/sigaltstack.2 +5 -2
index 53268ccbe..1510a98ab 100644
@@ -54,7 +54,10 @@ alternate signal stack.
  An alternate signal stack is used during the
  execution of a signal handler if the establishment of that handler (see
  .BR sigaction (2))
-requested it.
+requested it using the
+.B SA_ONSTACK
+flag.  Each thread that can execute such signal handlers needs its own
+separate alternate signal stack.
  .PP
  The normal sequence of events for using an alternate signal stack
  is the following:
@@ -67,7 +70,7 @@ signal stack.
  Use
  .BR sigaltstack ()
  to inform the system of the existence and
-location of the alternate signal stack.
+location of the alternate signal stack for the current thread.
  .TP
  3.
  When establishing a signal handler using
Signature · 3 lines
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
Senior SW Engineer; http://www.alejandro-colomar.es/