Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Jul 2010 22:09:23 -0700
From:      Garrett Cooper <yanegomi@gmail.com>
To:        Kostik Belousov <kostikbel@gmail.com>
Cc:        hackers@freebsd.org
Subject:   [PATCH] Catch errors with sigaddset(3) in sigaddset (sigrelse)
Message-ID:  <AANLkTilMOfLCkv_FfO9sU0eyiGjuuHBbR2l5CaEvlXRw@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
    sigrelse has the same problem as (*sigset) as far as not catching
sigaddset(3) errors is concerned.
Thanks,
-Garrett

Index: compat-43/sigcompat.c
===================================================================
--- compat-43/sigcompat.c	(revision 210226)
+++ compat-43/sigcompat.c	(working copy)
@@ -151,7 +151,8 @@
 	sigset_t set;

 	sigemptyset(&set);
-	sigaddset(&set, sig);
+	if (sigaddset(&set, sig) == -1)
+		return (-1);
 	return (_sigprocmask(SIG_UNBLOCK, &set, NULL));
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTilMOfLCkv_FfO9sU0eyiGjuuHBbR2l5CaEvlXRw>