mirror of https://github.com/mkerrisk/man-pages
Added a bit more detail on what sigreturn() actually does.
This commit is contained in:
parent
ea622c196c
commit
0678a1d4d1
|
@ -22,8 +22,9 @@
|
|||
.\"
|
||||
.\" Created Sat Aug 21 1995 Thomas K. Dyas <tdyas@eden.rutgers.edu>
|
||||
.\" Modified Tue Oct 22 22:09:03 1996 by Eric S. Raymond <esr@thyrsus.com>
|
||||
.\" 2008-06-26, mtk, added some more detail on the work done by sigreturn()
|
||||
.\"
|
||||
.TH SIGRETURN 2 1995-08-21 "Linux" "Linux Programmer's Manual"
|
||||
.TH SIGRETURN 2 2008-06-26 "Linux" "Linux Programmer's Manual"
|
||||
.SH NAME
|
||||
sigreturn \- return from signal handler and cleanup stack frame
|
||||
.SH SYNOPSIS
|
||||
|
@ -32,14 +33,21 @@ sigreturn \- return from signal handler and cleanup stack frame
|
|||
When the Linux kernel creates the stack frame for a signal handler, a
|
||||
call to
|
||||
.BR sigreturn ()
|
||||
is inserted into the stack frame so that the signal handler will
|
||||
call
|
||||
is inserted into the stack frame so that upon
|
||||
return from the signal handler,
|
||||
.BR sigreturn ()
|
||||
upon return.
|
||||
This inserted call to
|
||||
will be called.
|
||||
|
||||
This
|
||||
.BR sigreturn ()
|
||||
cleans up the stack so that the process can restart from where it was
|
||||
interrupted by the signal.
|
||||
call undoes everything that was
|
||||
done\(emchanging the process's signal mask, switching stacks (see
|
||||
.BR sigaltstack "(2))\(emin "
|
||||
order to invoke the signal handler:
|
||||
it restores the process's signal mask, switches stacks,
|
||||
and restores the process's context (registers, processor flags),
|
||||
so that the process directly resumes execution
|
||||
at the point where it was interrupted by the signal.
|
||||
.SH "RETURN VALUE"
|
||||
.BR sigreturn ()
|
||||
never returns.
|
||||
|
@ -64,4 +72,5 @@ argument varies depending on the architecture.
|
|||
.SH "SEE ALSO"
|
||||
.BR kill (2),
|
||||
.BR signal (2),
|
||||
.BR sigalstack (2),
|
||||
.BR signal (7)
|
||||
|
|
Loading…
Reference in New Issue