1 .\" Copyright (C) 1995, Thomas K. Dyas <tdyas@eden.rutgers.edu>
3 .\" %%%LICENSE_START(VERBATIM)
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.
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.
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
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" the source, must acknowledge the copyright and authors of this work.
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>
27 .\" 2008-06-26, mtk, added some more detail on the work done by sigreturn()
29 .TH SIGRETURN 2 2013-07-30 "Linux" "Linux Programmer's Manual"
31 sigreturn \- return from signal handler and cleanup stack frame
33 .BI "int sigreturn(unsigned long " __unused );
35 When the Linux kernel creates the stack frame for a signal handler, a
38 is inserted into the stack frame so that upon
39 return from the signal handler,
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.
57 /usr/src/linux/arch/i386/kernel/signal.c
59 /usr/src/linux/arch/alpha/kernel/entry.S
62 is specific to Linux and should not be used in programs intended to be
67 call is used by the kernel to implement signal handlers.
71 Better yet, the specific use of the
73 argument varies depending on the architecture.
76 .BR restart_syscall (2),
81 This page is part of release 3.68 of the Linux
84 A description of the project,
85 information about reporting bugs,
86 and the latest version of this page,
88 \%http://www.kernel.org/doc/man\-pages/.