Commit 314ad64d authored by Stan Seibert's avatar Stan Seibert

Make ogg123 shutdown cleanly when receiving SIGTERM. Fix provided by

Nathan Straz.

svn path=/trunk/vorbis-tools/; revision=5638
parent e3669a10
......@@ -14,7 +14,7 @@
* *
********************************************************************
last mod: $Id: ogg123.c,v 1.70 2003/09/02 19:37:05 volsung Exp $
last mod: $Id: ogg123.c,v 1.71 2003/11/27 19:38:29 volsung Exp $
********************************************************************/
......@@ -108,6 +108,10 @@ void signal_handler (int signo)
sig_request.last_ctrl_c = now;
break;
case SIGTERM:
sig_request.exit = 1;
break;
case SIGTSTP:
sig_request.pause = 1;
/* buffer_Pause (Options.outputOpts.buffer);
......@@ -381,7 +385,7 @@ int main(int argc, char **argv)
signal (SIGINT, signal_handler);
signal (SIGTSTP, signal_handler);
signal (SIGCONT, signal_handler);
signal (SIGTERM, signal_handler);
/* Play the files/streams */
i = 0;
......
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