Linux Hotplug development
 help / color / mirror / Atom feed
* [PATCH] udevd: clarify worker exit status
@ 2011-04-21  8:06 harald
  2011-04-21  8:09 ` harald
  0 siblings, 1 reply; 2+ messages in thread
From: harald @ 2011-04-21  8:06 UTC (permalink / raw)
  To: linux-hotplug

From: Harald Hoyer <harald@redhat.com>

---
 udev/udevd.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/udev/udevd.c b/udev/udevd.c
index b8513e1..b0474b1 100644
--- a/udev/udevd.c
+++ b/udev/udevd.c
@@ -812,7 +812,15 @@ 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\n", pid, 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;
-- 
1.7.3.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-04-21  8:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-21  8:06 [PATCH] udevd: clarify worker exit status harald
2011-04-21  8:09 ` harald

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox