diff options
author | marcel <marcel@FreeBSD.org> | 1999-10-02 19:24:24 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 1999-10-02 19:24:24 +0000 |
commit | 3e2b5fba5c91dc1e24adf05af3684010b89a444b (patch) | |
tree | e2e62bba4a65238a5b1eb929560f78c7dfa4f759 /lib | |
parent | bbea2fab83170c021aaa767678c591bbec4bed6a (diff) | |
download | FreeBSD-src-3e2b5fba5c91dc1e24adf05af3684010b89a444b.zip FreeBSD-src-3e2b5fba5c91dc1e24adf05af3684010b89a444b.tar.gz |
o Add $FreeBSD$ as a rcsid instead of in a comment.
o Fix formatting
o Return the error if sigprocmask fails instead of undefined data.
Submitted by: bde
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/compat-43/sigcompat.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/lib/libc/compat-43/sigcompat.c b/lib/libc/compat-43/sigcompat.c index fa25e50..46431ef 100644 --- a/lib/libc/compat-43/sigcompat.c +++ b/lib/libc/compat-43/sigcompat.c @@ -29,12 +29,14 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * $FreeBSD$ */ #if defined(LIBC_SCCS) && !defined(lint) +#if 0 static char sccsid[] = "@(#)sigcompat.c 8.1 (Berkeley) 6/2/93"; +#endif +static const char rcsid[] = + "$FreeBSD$"; #endif /* LIBC_SCCS and not lint */ #include <sys/param.h> @@ -61,10 +63,13 @@ sigsetmask(mask) int mask; { sigset_t set, oset; + int n; sigemptyset(&set); set.__bits[0] = mask; - (void)sigprocmask(SIG_SETMASK, &set, &oset); + n = sigprocmask(SIG_SETMASK, &set, &oset); + if (n) + return (n); return (oset.__bits[0]); } @@ -73,11 +78,13 @@ sigblock(mask) int mask; { sigset_t set, oset; + int n; sigemptyset(&set); set.__bits[0] = mask; - - (void)sigprocmask(SIG_BLOCK, &set, &oset); + n = sigprocmask(SIG_BLOCK, &set, &oset); + if (n) + return (n); return (oset.__bits[0]); } |