]> Sergey Matveev's repositories - public-inbox.git/commitdiff
spawnpp: die instead of exit on exec failure
authorEric Wong <e@80x24.org>
Sun, 28 Feb 2016 23:39:12 +0000 (23:39 +0000)
committerEric Wong <e@80x24.org>
Sun, 28 Feb 2016 23:57:34 +0000 (23:57 +0000)
Perl may complain about exit not being executed, but not die.

lib/PublicInbox/SpawnPP.pm

index 1a402e4222d0d30f30aae11414ec2a2e939eca06..288625d00a9279305bea4e7de7f69fe8f493fa14 100644 (file)
@@ -25,7 +25,7 @@ sub public_inbox_fork_exec ($$$$$$) {
                        $ENV{$k} = $v;
                }
                exec @$cmd;
-               exit 1;
+               die "exec $cmd->[0] failed: $!\n";
        }
        $pid;
 }