Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Nov 2010 15:25:01 -0800
From:      Garrett Cooper <yanegomi@gmail.com>
To:        freebsd-hackers@freebsd.org
Subject:   [PATCH] More explicit return codes for sigismember(3)
Message-ID:  <AANLkTi=USOfKgYEUR4BQrCrjz6tFKVAod2E%2BgS%2BwC2Xu@mail.gmail.com>

next in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
Hi,
    I found this change kicking around my tree from a while back. It
brings the manpage for sigismember(3) more in line with the POSIX
definition [1] in the RETURN CODES section by explicitly noting that
sigismember(3) returns 0 if a signal is valid and not a part of the
set passed in.
    If someone could review and commit the change, it would be much appreciated.
Thanks!
-Garrett

[1] http://www.opengroup.org/onlinepubs/009695399/functions/sigismember.html
(SUS Issue 6 -- but the wording for the manpage is the same in SUS
Issue 7).

[-- Attachment #2 --]
Index: lib/libc/gen/sigsetops.3
===================================================================
--- lib/libc/gen/sigsetops.3	(revision 215310)
+++ lib/libc/gen/sigsetops.3	(working copy)
@@ -92,8 +92,11 @@
 The
 .Fn sigismember
 function returns 1
-if the signal is a member of the set,
-0 otherwise.
+if the signal is a member of the set, or 0 if it is not.
+Otherwise, it returns \-1 and the global variable
+.Va errno
+is set to indicate the reason.
+.Bl
 The other functions return 0 upon success.
 A \-1 return value
 indicates an error occurred and the global variable

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTi=USOfKgYEUR4BQrCrjz6tFKVAod2E%2BgS%2BwC2Xu>