From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Jenkins Date: Tue, 26 May 2009 09:52:38 +0000 Subject: [PATCH 1/2] udevd: respect the value of TIMEOUT in uevents Message-Id: <4A1BBBE6.4040202@tuffmail.co.uk> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org 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 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);