summaryrefslogtreecommitdiff
path: root/udevd.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2008-04-21 19:00:54 +0200
committerKay Sievers <kay.sievers@vrfy.org>2008-04-21 19:00:54 +0200
commitbf50425b58da6f112197f79241dd6d64af2e9ea7 (patch)
tree2e3f961beaff4d62404ae9191c4c8a996f608cbc /udevd.c
parent6b795c99e00c92dd29abafcc1022cace7bbcb795 (diff)
add OPTIONS+="event_timeout=<seconds>"
Diffstat (limited to 'udevd.c')
-rw-r--r--udevd.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/udevd.c b/udevd.c
index 66a410ec77..c895c1dc6a 100644
--- a/udevd.c
+++ b/udevd.c
@@ -115,7 +115,7 @@ static int udev_event_process(struct udevd_uevent_msg *msg)
sigaction(SIGHUP, &act, NULL);
/* trigger timeout to prevent hanging processes */
- alarm(UDEV_ALARM_TIMEOUT);
+ alarm(UDEV_EVENT_TIMEOUT);
/* reconstruct event environment from message */
for (i = 0; msg->envp[i]; i++)
@@ -131,6 +131,10 @@ static int udev_event_process(struct udevd_uevent_msg *msg)
retval = udev_device_event(&rules, udev);
+ /* rules may change/disable the timeout */
+ if (udev->event_timeout >= 0)
+ alarm(udev->event_timeout);
+
/* run programs collected by RUN-key*/
if (retval == 0 && !udev->ignore_device && udev_run)
retval = udev_rules_run(udev);