[xiph-cvs] cvs commit: vorbis-tools/ogg123 ogg123.c

Stan Seibert volsung at xiph.org
Thu Nov 27 11:38:31 PST 2003



volsung     03/11/27 14:38:30

  Modified:    ogg123   ogg123.c
  Log:
  Make ogg123 shutdown cleanly when receiving SIGTERM.  Fix provided by
  Nathan Straz.

Revision  Changes    Path
1.71      +6 -2      vorbis-tools/ogg123/ogg123.c

Index: ogg123.c
===================================================================
RCS file: /usr/local/cvsroot/vorbis-tools/ogg123/ogg123.c,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -r1.70 -r1.71
--- ogg123.c	2 Sep 2003 19:37:05 -0000	1.70
+++ ogg123.c	27 Nov 2003 19:38:29 -0000	1.71
@@ -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 @@
     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 @@
   signal (SIGINT, signal_handler);
   signal (SIGTSTP, signal_handler);
   signal (SIGCONT, signal_handler);
-
+  signal (SIGTERM, signal_handler);
 
   /* Play the files/streams */
   i = 0;

<p><p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list