1 .\" Copyright (C) 1995, Thomas K. Dyas <tdyas@eden.rutgers.edu>
3 .\" Permission is granted to make and distribute verbatim copies of this
4 .\" manual provided the copyright notice and this permission notice are
5 .\" preserved on all copies.
7 .\" Permission is granted to copy and distribute modified versions of this
8 .\" manual under the conditions for verbatim copying, provided that the
9 .\" entire resulting derived work is distributed under the terms of a
10 .\" permission notice identical to this one.
12 .\" Since the Linux kernel and libraries are constantly changing, this
13 .\" manual page may be incorrect or out-of-date. The author(s) assume no
14 .\" responsibility for errors or omissions, or for damages resulting from
15 .\" the use of the information contained herein. The author(s) may not
16 .\" have taken the same level of care in the production of this manual,
17 .\" which is licensed free of charge, as they might when working
20 .\" Formatted or processed versions of this manual, if unaccompanied by
21 .\" the source, must acknowledge the copyright and authors of this work.
23 .\" Created Sat Aug 21 1995 Thomas K. Dyas <tdyas@eden.rutgers.edu>
24 .\" Modified Tue Oct 22 22:09:03 1996 by Eric S. Raymond <esr@thyrsus.com>
25 .\" 2008-06-26, mtk, added some more detail on the work done by sigreturn()
27 .TH SIGRETURN 2 2008-06-26 "Linux" "Linux Programmer's Manual"
29 sigreturn \- return from signal handler and cleanup stack frame
31 .BI "int sigreturn(unsigned long " __unused );
33 When the Linux kernel creates the stack frame for a signal handler, a
36 is inserted into the stack frame so that upon
37 return from the signal handler,
43 call undoes everything that was
44 done\(emchanging the process's signal mask, switching stacks (see
45 .BR sigaltstack "(2))\(emin "
46 order to invoke the signal handler:
47 it restores the process's signal mask, switches stacks,
48 and restores the process's context (registers, processor flags),
49 so that the process directly resumes execution
50 at the point where it was interrupted by the signal.
55 /usr/src/linux/arch/i386/kernel/signal.c
57 /usr/src/linux/arch/alpha/kernel/entry.S
60 is specific to Linux and should not be used in programs intended to be
65 call is used by the kernel to implement signal handlers.
69 Better yet, the specific use of the
71 argument varies depending on the architecture.