]>
Commit | Line | Data |
---|---|---|
fea681da MK |
1 | .\" Copyright (C) 1995, Thomas K. Dyas <tdyas@eden.rutgers.edu> |
2 | .\" | |
93015253 | 3 | .\" %%%LICENSE_START(VERBATIM) |
fea681da MK |
4 | .\" Permission is granted to make and distribute verbatim copies of this |
5 | .\" manual provided the copyright notice and this permission notice are | |
6 | .\" preserved on all copies. | |
7 | .\" | |
8 | .\" Permission is granted to copy and distribute modified versions of this | |
9 | .\" manual under the conditions for verbatim copying, provided that the | |
10 | .\" entire resulting derived work is distributed under the terms of a | |
11 | .\" permission notice identical to this one. | |
c13182ef | 12 | .\" |
fea681da MK |
13 | .\" Since the Linux kernel and libraries are constantly changing, this |
14 | .\" manual page may be incorrect or out-of-date. The author(s) assume no | |
15 | .\" responsibility for errors or omissions, or for damages resulting from | |
16 | .\" the use of the information contained herein. The author(s) may not | |
17 | .\" have taken the same level of care in the production of this manual, | |
18 | .\" which is licensed free of charge, as they might when working | |
19 | .\" professionally. | |
c13182ef | 20 | .\" |
fea681da MK |
21 | .\" Formatted or processed versions of this manual, if unaccompanied by |
22 | .\" the source, must acknowledge the copyright and authors of this work. | |
4b72fb64 | 23 | .\" %%%LICENSE_END |
fea681da MK |
24 | .\" |
25 | .\" Created Sat Aug 21 1995 Thomas K. Dyas <tdyas@eden.rutgers.edu> | |
26 | .\" Modified Tue Oct 22 22:09:03 1996 by Eric S. Raymond <esr@thyrsus.com> | |
0678a1d4 | 27 | .\" 2008-06-26, mtk, added some more detail on the work done by sigreturn() |
fea681da | 28 | .\" |
d806bc05 | 29 | .TH SIGRETURN 2 2013-07-30 "Linux" "Linux Programmer's Manual" |
fea681da MK |
30 | .SH NAME |
31 | sigreturn \- return from signal handler and cleanup stack frame | |
32 | .SH SYNOPSIS | |
33 | .BI "int sigreturn(unsigned long " __unused ); | |
34 | .SH DESCRIPTION | |
35 | When the Linux kernel creates the stack frame for a signal handler, a | |
36 | call to | |
e511ffb6 | 37 | .BR sigreturn () |
0678a1d4 MK |
38 | is inserted into the stack frame so that upon |
39 | return from the signal handler, | |
e511ffb6 | 40 | .BR sigreturn () |
0678a1d4 MK |
41 | will be called. |
42 | ||
00ac6ce4 | 43 | This |
e511ffb6 | 44 | .BR sigreturn () |
0678a1d4 MK |
45 | call undoes everything that was |
46 | done\(emchanging the process's signal mask, switching stacks (see | |
47 | .BR sigaltstack "(2))\(emin " | |
48 | order to invoke the signal handler: | |
49 | it restores the process's signal mask, switches stacks, | |
50 | and restores the process's context (registers, processor flags), | |
51 | so that the process directly resumes execution | |
52 | at the point where it was interrupted by the signal. | |
47297adb | 53 | .SH RETURN VALUE |
e511ffb6 | 54 | .BR sigreturn () |
fea681da | 55 | never returns. |
2b2581ee MK |
56 | .SH FILES |
57 | /usr/src/linux/arch/i386/kernel/signal.c | |
58 | .br | |
59 | /usr/src/linux/arch/alpha/kernel/entry.S | |
47297adb | 60 | .SH CONFORMING TO |
2dd578fd MK |
61 | .BR sigreturn () |
62 | is specific to Linux and should not be used in programs intended to be | |
63 | portable. | |
6c36ac81 | 64 | .SH NOTES |
fea681da | 65 | The |
e511ffb6 | 66 | .BR sigreturn () |
c13182ef MK |
67 | call is used by the kernel to implement signal handlers. |
68 | It should | |
fea681da | 69 | .B never |
c13182ef MK |
70 | be called directly. |
71 | Better yet, the specific use of the | |
fea681da MK |
72 | .I __unused |
73 | argument varies depending on the architecture. | |
47297adb | 74 | .SH SEE ALSO |
fea681da | 75 | .BR kill (2), |
d806bc05 | 76 | .BR restart_syscall (2), |
e91751c9 | 77 | .BR sigaltstack (2), |
fea681da MK |
78 | .BR signal (2), |
79 | .BR signal (7) |