All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] udevd: respect the value of TIMEOUT in uevents
@ 2009-05-26  9:52 Alan Jenkins
  2009-05-26 10:17 ` Kay Sievers
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Alan Jenkins @ 2009-05-26  9:52 UTC (permalink / raw)
  To: linux-hotplug

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);



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

end of thread, other threads:[~2009-05-26 16:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-26  9:52 [PATCH 1/2] udevd: respect the value of TIMEOUT in uevents Alan Jenkins
2009-05-26 10:17 ` Kay Sievers
2009-05-26 10:19 ` Alan Jenkins
2009-05-26 15:31 ` Kay Sievers
2009-05-26 16:55 ` Alan Jenkins

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.