From: Martin Mares Date: Thu, 16 Feb 2012 15:47:26 +0000 (+0100) Subject: run: Avoid SIGPIPE X-Git-Tag: v3.0~7 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=ca900c7e1c4669bc477f2fb65997d40bad794c10;p=bex.git run: Avoid SIGPIPE --- diff --git a/TODO b/TODO index 140da97..2d381aa 100644 --- a/TODO +++ b/TODO @@ -7,3 +7,4 @@ - global error indicators should be displayed in red - Terminology: machine vs. host - Detector of orphans (unused queue dirs, jobs on non-existent machines, non-queued jobs) +- When bex run uploads a temporary file, shouldn't it be more insistent on removing it on failures? diff --git a/lib/bin/bex-run b/lib/bin/bex-run index 270c0ce..97d46c0 100755 --- a/lib/bin/bex-run +++ b/lib/bin/bex-run @@ -30,6 +30,9 @@ GetOptions( "help" => \&usage, ) or die "Try `bex run --help' for more information.\n"; +# We do not want SIGPIPE on writes to the status FIFO +$SIG{'PIPE'} = 'IGNORE'; + my $status_fd; if (defined $status_fifo) { open $status_fd, '>>', $status_fifo or die "Cannot open status FIFO: $!";