]> err.no Git - systemd/commitdiff
udevd: clarify worker exit status
authorHarald Hoyer <harald@redhat.com>
Thu, 21 Apr 2011 08:06:12 +0000 (10:06 +0200)
committerHarald Hoyer <harald@redhat.com>
Thu, 21 Apr 2011 08:09:41 +0000 (10:09 +0200)
udev/udevd.c

index b8513e11fe658c7d2cafe2a43e5088a2c8e8e58c..0e73f81069630541bb4e7a53d3657446782466be 100644 (file)
@@ -812,7 +812,16 @@ static void handle_signal(struct udev *udev, int signo)
 
                                info(udev, "worker [%u] exit\n", pid);
                                if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) {
-                                       err(udev, "worker [%u] unexpectedly returned with status 0x%04x\n", pid, status);
+                                       if (WEXITSTATUS(status))
+                                               err(udev, "worker [%u] unexpectedly returned with status %d\n", pid, WEXITSTATUS(status));
+                                       else if (WIFSIGNALED(status))
+                                         err(udev, "worker [%u] killed by signal %d (%s)\n", pid, 
+                                             WTERMSIG(status), strsignal(WTERMSIG(status)));
+                                       else if (WIFSTOPPED(status))
+                                               err(udev, "worker [%u] unexpectedly stopped\n", pid);
+                                       else if (WIFCONTINUED(status))
+                                               err(udev, "worker [%u] continued\n", pid);
+
                                        if (worker->event != NULL) {
                                                err(udev, "worker [%u] failed while handling '%s'\n", pid, worker->event->devpath);
                                                worker->event->exitcode = -32;