Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Mar 2026 14:39:09 +0000
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 9da4a804f091 - main - sigreturn.2: refresh the man page
Message-ID:  <69b17e8d.3791a.b59e630@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=9da4a804f0916b24519b8baa7ed460a7ba23d8c8

commit 9da4a804f0916b24519b8baa7ed460a7ba23d8c8
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2026-03-08 20:08:42 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2026-03-11 14:38:34 +0000

    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
---
 lib/libsys/sigreturn.2 | 24 ++++++++++++++++--------
 1 file 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


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69b17e8d.3791a.b59e630>