tIgnore SIGPIPE and only cancel on EPIPE - ratox - FIFO based tox client
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit b87b960daaa2c4d79728d8e1d97f2d0ce1339883
 (DIR) parent ee6c055b69a608e46f23a8d3daae0527d0817e3e
 (HTM) Author: sin <sin@2f30.org>
       Date:   Wed, 24 Sep 2014 14:46:48 +0100
       
       Ignore SIGPIPE and only cancel on EPIPE
       
       Diffstat:
         M ratox.c                             |       4 +++-
       
       1 file changed, 3 insertions(+), 1 deletion(-)
       ---
 (DIR) diff --git a/ratox.c b/ratox.c
       t@@ -545,7 +545,8 @@ cbfiledata(Tox *m, int32_t fid, uint8_t fnum, const uint8_t *data, uint16_t len,
        
                n = write(f->fd[FFILE_OUT], data, len);
                if (n < 0)
       -                cancelrxtransfer(f);
       +                if (errno == EPIPE)
       +                        cancelrxtransfer(f);
        }
        
        static void
       t@@ -1401,6 +1402,7 @@ main(int argc, char *argv[])
                signal(SIGQUIT, initshutdown);
                signal(SIGABRT, initshutdown);
                signal(SIGTERM, initshutdown);
       +        signal(SIGPIPE, SIG_IGN);
        
                printrat();
                toxinit();