1SIGRETURN(2) Linux Programmer's Manual SIGRETURN(2)
2
3
4
6 sigreturn - return from signal handler and cleanup stack frame
7
9 int sigreturn(unsigned long __unused);
10
12 When the Linux kernel creates the stack frame for a signal handler, a
13 call to sigreturn() is inserted into the stack frame so that upon
14 return from the signal handler, sigreturn() will be called.
15
16 This sigreturn() call undoes everything that was done—changing the
17 process's signal mask, switching stacks (see sigaltstack(2))—in order
18 to invoke the signal handler: it restores the process's signal mask,
19 switches stacks, and restores the process's context (registers, proces‐
20 sor flags), so that the process directly resumes execution at the point
21 where it was interrupted by the signal.
22
24 sigreturn() never returns.
25
27 /usr/src/linux/arch/i386/kernel/signal.c
28 /usr/src/linux/arch/alpha/kernel/entry.S
29
31 sigreturn() is specific to Linux and should not be used in programs
32 intended to be portable.
33
35 The sigreturn() call is used by the kernel to implement signal han‐
36 dlers. It should never be called directly. Better yet, the specific
37 use of the __unused argument varies depending on the architecture.
38
40 kill(2), sigaltstack(2), signal(2), signal(7)
41
43 This page is part of release 3.22 of the Linux man-pages project. A
44 description of the project, and information about reporting bugs, can
45 be found at http://www.kernel.org/doc/man-pages/.
46
47
48
49Linux 2008-06-26 SIGRETURN(2)