aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2026-03-08 20:08:42 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2026-03-11 14:38:34 +0000
commit9da4a804f0916b24519b8baa7ed460a7ba23d8c8 (patch)
treefb6934f299d82f66b9fe28175e8ba093e3e8c16d
parente71bfbe2f58ffff8f16a9da075d98fff41671bac (diff)
sigreturn.2: refresh the man page
Remove mention of the longjmp(3), which does not use sigreturn. Try to be more precise when describing the syscall effects. Reviewed by: emaste, markj Sponsored by: The FreeBSD Foundation MFC after: 3 days Differential revision: https://reviews.freebsd.org/D55750
-rw-r--r--lib/libsys/sigreturn.224
1 files changed, 16 insertions, 8 deletions
diff --git a/lib/libsys/sigreturn.2 b/lib/libsys/sigreturn.2
index 4effeaa5abc7..0e7bca507fc7 100644
--- a/lib/libsys/sigreturn.2
+++ b/lib/libsys/sigreturn.2
@@ -25,7 +25,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd September 6, 2013
+.Dd March 11, 2026
.Dt SIGRETURN 2
.Os
.Sh NAME
@@ -47,17 +47,25 @@ The thread's signal mask and stack status are
restored from the context structure pointed to by
.Fa scp .
The system call does not return;
-the users stack pointer, frame pointer, argument pointer,
-and processor status longword are restored from the context.
-Execution resumes at the specified pc.
-This system call is used by the trampoline code and
-.Xr longjmp 3
+the whole userspace context as specified by
+.Fa scp ,
+including the userspace stack pointer, all general-purpose registers,
+coprocessor state, process status register, and program counter
+are restored from the context.
+Execution resumes at the program counter from the specified context.
+.Pp
+This system call is used by the kernel-provided signal trampoline code,
+located in the virtual DSO (VDSO) on some architectures or as raw code
+in the shared page if VDSO is not provided,
when returning from a signal to the previously executing program.
.Sh RETURN VALUES
If successful, the system call does not return.
-Otherwise, a value of -1 is returned and
+Otherwise, a value of -1 may be returned, with
.Va errno
-is set to indicate the error.
+set to indicate the error.
+Some conditions detected by hardware result in the delivery of
+a synchronous trap signal to the thread, in addition to or instead of
+setting the system call error code.
.Sh ERRORS
The
.Fn sigreturn