sox-devel@lists.sourceforge.net unofficial mirror
 help / color / mirror / code / Atom feed
From: Eric Wong <normalperson@yhbt.net>
To: sox-devel@lists.sourceforge.net
Subject: [PATCH] ignore SIGPIPE so stop callbacks may fire
Date: Sun, 28 Dec 2014 04:01:47 +0000	[thread overview]
Message-ID: <20141228040147.GA21025@dcvr.yhbt.net> (raw)

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

                 reply	other threads:[~2014-12-28 10:01 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.sourceforge.net/lists/listinfo/sox-devel

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141228040147.GA21025@dcvr.yhbt.net \
    --to=sox-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/sox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).