diff options
Diffstat (limited to 'test-udev.c')
-rw-r--r-- | test-udev.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test-udev.c b/test-udev.c index e341b74f2f..4ac2d5a889 100644 --- a/test-udev.c +++ b/test-udev.c @@ -105,7 +105,7 @@ int main(int argc, char *argv[], char *envp[]) sigaction(SIGTERM, &act, NULL); /* trigger timeout to prevent hanging processes */ - alarm(UDEV_ALARM_TIMEOUT); + alarm(UDEV_EVENT_TIMEOUT); action = getenv("ACTION"); devpath = getenv("DEVPATH"); @@ -154,6 +154,10 @@ int main(int argc, char *argv[], char *envp[]) retval = udev_device_event(&rules, udev); + /* rules may change/disable the timeout */ + if (udev->event_timeout >= 0) + alarm(udev->event_timeout); + if (retval == 0 && !udev->ignore_device && udev_run) udev_rules_run(udev); |