chiark / gitweb /
[PATCH] Don't use any syslog() in signal handler, cause it may deadlock.
[elogind.git] / udev.c
diff --git a/udev.c b/udev.c
index 5064bbd17512b0e6463a7fc147469b851cacc39c..78090605206f1fab763c4a1dccb21d485967940b 100644 (file)
--- a/udev.c
+++ b/udev.c
@@ -20,7 +20,6 @@
  *
  */
 
-#define _KLIBC_HAS_ARCH_SIG_ATOMIC_T
 #include <stdio.h>
 #include <stddef.h>
 #include <stdlib.h>
@@ -66,14 +65,10 @@ static void asmlinkage sig_handler(int signum)
        switch (signum) {
                case SIGALRM:
                        gotalarm = 1;
-                       info("error: timeout reached, event probably not handled correctly");
                        break;
                case SIGINT:
                case SIGTERM:
-                       udevdb_exit();
                        exit(20 + signum);
-               default:
-                       dbg("unhandled signal %d", signum);
        }
 }
 
@@ -149,6 +144,7 @@ int main(int argc, char *argv[], char *envp[])
        /* set signal handlers */
        act.sa_handler = (void (*) (int))sig_handler;
        sigemptyset (&act.sa_mask);
+       act.sa_flags = 0;
        /* alarm must not restart syscalls*/
        sigaction(SIGALRM, &act, NULL);
        sigaction(SIGINT, &act, NULL);