From 3bb8b93140bb6511c7bcd235b327cdf09815030e Mon Sep 17 00:00:00 2001 From: yamt Date: Sat, 10 Aug 2002 05:05:24 +0000 Subject: [PATCH] more about sigsetjmp/siglongjmp. from openbsd. --- lib/libc/gen/setjmp.3 | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/lib/libc/gen/setjmp.3 b/lib/libc/gen/setjmp.3 index 538e84ad9584..06820a7f0d57 100644 --- a/lib/libc/gen/setjmp.3 +++ b/lib/libc/gen/setjmp.3 @@ -1,4 +1,4 @@ -.\" $NetBSD: setjmp.3,v 1.10 2002/07/10 14:37:14 yamt Exp $ +.\" $NetBSD: setjmp.3,v 1.11 2002/08/10 05:05:24 yamt Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -137,7 +137,30 @@ The function pairs save and restore the signal mask if the argument .Fa savemask -is non-zero, otherwise only the register set and the stack are saved. +is non-zero. +Otherwise, only the register set and the stack are saved. +.Pp +In other words, +.Fn setjmp Ns / Ns Fn longjmp +are functionally equivalent to +.Fn sigsetjmp Ns / Ns Fn siglongjmp +when +.Fn sigsetjmp +is called with a non-zero +.Fa savemask +argument. +Conversely, +.Fn _setjmp Ns / Ns Fn _longjmp +are functionally equivalent to +.Fn sigsetjmp Ns / Ns Fn siglongjmp +when +.Fn sigsetjmp +is called with a zero-value +.Fa savemask . +.Pp +The +.Fn sigsetjmp Ns / Ns Fn siglongjmp +interfaces are preferred for maximum portability. .Sh ERRORS If the contents of the .Fa env