Port: Don't use SIGUNUSED which is not defined on Solaris
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Sat, 17 Oct 2015 23:41:47 +0000 (19:41 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 24 May 2016 18:44:07 +0000 (14:44 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/common/runas.c

index 46c7b9feac0cc8ac5ececb2c205127ce21b6954b..358ffc6a7bfccf3ac285edba31ef9305fc019fb7 100644 (file)
@@ -528,23 +528,14 @@ int run_as_rmdir_recursive(const char *path, uid_t uid, gid_t gid)
 }
 
 static
-int reset_sighandler(void)
+void reset_sighandler(void)
 {
-       int sig, ret = 0;
+       int sig;
 
-       for (sig = SIGHUP; sig <= SIGUNUSED; sig++) {
-               /* Skip unblockable signals. */
-               if (sig == SIGKILL || sig == SIGSTOP) {
-                       continue;
-               }
-               if (signal(sig, SIG_DFL) == SIG_ERR) {
-                       PERROR("reset signal %d", sig);
-                       ret = -1;
-                       goto end;
-               }
+       DBG("Resetting run_as worker signal handlers to default");
+       for (sig = 1; sig <= 31; sig++) {
+               (void) signal(sig, SIG_DFL);
        }
-end:
-       return ret;
 }
 
 static
This page took 0.026363 seconds and 4 git commands to generate.