From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eric Wong Newsgroups: gmane.comp.audio.sox.devel Subject: [PATCH] ignore SIGPIPE so stop callbacks may fire Date: Sun, 28 Dec 2014 04:01:47 +0000 Message-ID: <20141228040147.GA21025@dcvr.yhbt.net> Reply-To: sox-devel@lists.sourceforge.net NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1419760906 25899 80.91.229.3 (28 Dec 2014 10:01:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 28 Dec 2014 10:01:46 +0000 (UTC) To: sox-devel@lists.sourceforge.net Original-X-From: sox-devel-bounces@lists.sourceforge.net Sun Dec 28 11:01:40 2014 Return-path: Envelope-to: gcasd-sox-devel@m.gmane.org X-ACL-Warn: Content-Disposition: inline X-Spam-Score: 1.1 (+) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain 1.1 DATE_IN_PAST_03_06 Date: is 3 to 6 hours before Received: date 0.0 TIME_LIMIT_EXCEEDED Exceeded time limit / deadline X-Headers-End: 1Y5Aeu-0007Je-MG X-BeenThere: sox-devel@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: sox-devel-bounces@lists.sourceforge.net Xref: news.gmane.org gmane.comp.audio.sox.devel:388 Archived-At: Received: from lists.sourceforge.net ([216.34.181.88]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Y5AfL-0002cu-Bf for gcasd-sox-devel@m.gmane.org; Sun, 28 Dec 2014 11:01:39 +0100 Received: from localhost ([127.0.0.1] helo=sfs-ml-4.v29.ch3.sourceforge.com) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1Y5AfC-0001YR-NX; Sun, 28 Dec 2014 10:01:30 +0000 Received: from sog-mx-2.v43.ch3.sourceforge.com ([172.29.43.192] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1Y5AfB-0001YK-73 for sox-devel@lists.sourceforge.net; Sun, 28 Dec 2014 10:01:29 +0000 Received: from dcvr.yhbt.net ([64.71.152.64]) by sog-mx-2.v43.ch3.sourceforge.com with esmtp (Exim 4.76) id 1Y5Aeu-0007Je-MG for sox-devel@lists.sourceforge.net; Sun, 28 Dec 2014 10:01:29 +0000 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 7D411633819; Sun, 28 Dec 2014 04:01:47 +0000 (UTC) This is useful to allow the "stats" effect to show the incomplete stats if the writing pipe is broken. This is helpful for users of dtas-player[1] to show stats while seeking within portions of a file, as dtas-player will trigger SIGPIPE to stop a sox process before spawning a new one. --- Also submitted here: https://sourceforge.net/p/sox/patches/103/ But I prefer email for discussion, thanks for reading src/sox.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sox.c b/src/sox.c index fcdac94..bab0f45 100644 --- a/src/sox.c +++ b/src/sox.c @@ -2968,6 +2968,7 @@ int main(int argc, char **argv) set_replay_gain(files[i]->ft->oob.comments, files[i]); signal(SIGINT, SIG_DFL); + signal(SIGPIPE, SIG_IGN); /* Loop through the rest of the arguments looking for effects */ add_eff_chain(); -- EW ------------------------------------------------------------------------------ Dive into the World of Parallel Programming! The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net