pthread_kill (*ps, SIGTERM);
}
+static void exit_timeout (int signum)
+{
+ (void) signum;
+ signal (SIGINT, SIG_DFL);
+}
/*****************************************************************************
* main: parse command line, start interface and spawn threads.
sigwait (&set, &signum);
while (signum == SIGCHLD);
+ /* Restore default signal behaviour after 3 seconds */
+ sigemptyset (&set);
+ sigaddset (&set, SIGINT);
+ sigaddset (&set, SIGALRM);
+ signal (SIGINT, SIG_IGN);
+ signal (SIGALRM, exit_timeout);
+ pthread_sigmask (SIG_UNBLOCK, &set, NULL);
+ alarm (3);
+
/* Cleanup */
out:
if (vlc != NULL)