Commit 71148117 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont
Browse files

vlc.c: Attempt to kill VLC again if Ctrl-C is hit again when the abort timeout...

vlc.c: Attempt to kill VLC again if Ctrl-C is hit again when the abort timeout is ellapsed. It allows to abort VLC after the first abort timeout.
parent b026a42b
......@@ -274,19 +274,18 @@ static void *SigHandler (void *data)
* signals to a libvlc structure having been destroyed */
pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, &state);
if (abort_time == 0)
if (abort_time == 0 || time (NULL) > abort_time)
{
time (&abort_time);
abort_time += 2;
fprintf (stderr, "signal %d received, terminating vlc - do it "
"again in case it gets stuck\n", i_signal);
"again quickly in case it gets stuck\n", i_signal);
/* Acknowledge the signal received */
Kill ();
}
else
if (time (NULL) <= abort_time)
else /* time (NULL) <= abort_time */
{
/* If user asks again more than 2 seconds later, die badly */
pthread_sigmask (SIG_UNBLOCK, exitset, NULL);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment