From: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
To: linux-hotplug@vger.kernel.org
Subject: [PATCH 1/2] udevd: respect the value of TIMEOUT in uevents
Date: Tue, 26 May 2009 09:52:38 +0000 [thread overview]
Message-ID: <4A1BBBE6.4040202@tuffmail.co.uk> (raw)
I believe this is the correct behaviour. I'm highlighting this change
by making it a separate commit (even though the specific code will be
removed in the following commit).
Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
diff --git a/udev/test-udev.c b/udev/test-udev.c
index c6b8bf5..35737c1 100644
--- a/udev/test-udev.c
+++ b/udev/test-udev.c
@@ -70,7 +70,10 @@ int main(int argc, char *argv[])
sigaction(SIGTERM, &act, NULL);
/* trigger timeout to prevent hanging processes */
- alarm(UDEV_EVENT_TIMEOUT);
+ if (udev_device_get_timeout(event->dev) > 0)
+ alarm(udev_device_get_timeout(event->dev));
+ else
+ alarm(UDEV_EVENT_TIMEOUT);
action = getenv("ACTION");
devpath = getenv("DEVPATH");
diff --git a/udev/udevd.c b/udev/udevd.c
index 5ee61d2..03ea26d 100644
--- a/udev/udevd.c
+++ b/udev/udevd.c
@@ -156,7 +156,10 @@ static void event_fork(struct udev_event *event)
sigaction(SIGHUP, &act, NULL);
/* set timeout to prevent hanging processes */
- alarm(UDEV_EVENT_TIMEOUT);
+ if (udev_device_get_timeout(event->dev) > 0)
+ alarm(udev_device_get_timeout(event->dev));
+ else
+ alarm(UDEV_EVENT_TIMEOUT);
/* apply rules, create node, symlinks */
err = udev_event_execute_rules(event, rules);
next reply other threads:[~2009-05-26 9:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-26 9:52 Alan Jenkins [this message]
2009-05-26 10:17 ` [PATCH 1/2] udevd: respect the value of TIMEOUT in uevents Kay Sievers
2009-05-26 10:19 ` Alan Jenkins
2009-05-26 15:31 ` Kay Sievers
2009-05-26 16:55 ` Alan Jenkins
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=4A1BBBE6.4040202@tuffmail.co.uk \
--to=alan-jenkins@tuffmail.co.uk \
--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;
as well as URLs for NNTP newsgroup(s).