summaryrefslogtreecommitdiff
path: root/udev/udevd.c
diff options
context:
space:
mode:
authorHarald Hoyer <harald@redhat.com>2011-04-21 10:06:12 +0200
committerHarald Hoyer <harald@redhat.com>2011-04-21 10:09:41 +0200
commitb466e9ab3951207a3c0c8d2ba6167be1eac1e41a (patch)
treea88d2c141b9a4ecaa7b3c46d10596986ba322125 /udev/udevd.c
parent86d8ed2628ba3b60323a576cc4d2c86ba15779cf (diff)
udevd: clarify worker exit status
Diffstat (limited to 'udev/udevd.c')
-rw-r--r--udev/udevd.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/udev/udevd.c b/udev/udevd.c
index b8513e11fe..0e73f81069 100644
--- a/udev/udevd.c
+++ b/udev/udevd.c
@@ -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;