Linux Hotplug development
 help / color / mirror / Atom feed
From: harald@redhat.com
To: linux-hotplug@vger.kernel.org
Subject: [PATCH] udevd: clarify worker exit status
Date: Thu, 21 Apr 2011 08:09:52 +0000	[thread overview]
Message-ID: <1303373392-29695-1-git-send-email-harald@redhat.com> (raw)
In-Reply-To: <1303373212-29508-1-git-send-email-harald@redhat.com>

From: Harald Hoyer <harald@redhat.com>

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

diff --git a/udev/udevd.c b/udev/udevd.c
index b8513e1..0e73f81 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;
-- 
1.7.3.4


      reply	other threads:[~2011-04-21  8:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-21  8:06 [PATCH] udevd: clarify worker exit status harald
2011-04-21  8:09 ` harald [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1303373392-29695-1-git-send-email-harald@redhat.com \
    --to=harald@redhat.com \
    --cc=linux-hotplug@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox