shithub: sox

Download patch

ref: 623b25825fd3d1936191dcc4600a04fab6431851
parent: b765d62d950a1da15358b1ed6e1ff1b1ff015548
author: cbagwell <cbagwell>
date: Wed Nov 30 20:25:07 EST 2005

Allow aborting with SIGTERM along with SIGINT.

--- a/Changelog
+++ b/Changelog
@@ -47,6 +47,8 @@
     updates to the sample crossfade scripts.  Also modified fade
     effect to report when no more samples will be produced to
     prevent unneeded reading of whole file.
+  o Allow aborting SoX with SIGTERM, along with previous SIGINT.
+    Norman Ramsey.
 
 sox-12.17.8
 -----------
--- a/src/sox.c
+++ b/src/sox.c
@@ -259,6 +259,7 @@
     parse_effects(argc, argv);
 
     signal(SIGINT, sigint);
+    signal(SIGTERM, sigint);
 
     process();
     statistics();
@@ -1578,7 +1579,7 @@
 
 static void sigint(int s)
 {
-    if (s == SIGINT)
+    if (s == SIGINT || s == SIGTERM)
     {
         user_abort = 1;
     }