- /* set signal handlers */
- memset(&act, 0x00, sizeof(act));
- act.sa_handler = sig_handler;
- sigemptyset (&act.sa_mask);
- act.sa_flags = 0;
- sigaction(SIGALRM, &act, NULL);
- sigaction(SIGINT, &act, NULL);
- sigaction(SIGTERM, &act, NULL);
-
- /* trigger timeout to prevent hanging processes */
- alarm(UDEV_EVENT_TIMEOUT);