diff options
author | Eric Wong <e@yhbt.net> | 2020-03-03 09:50:57 +0000 |
---|---|---|
committer | Eric Wong <e@yhbt.net> | 2020-03-04 10:47:42 +0000 |
commit | 4de32cbee1bab278a15cd83e7c620de0d7777be5 (patch) | |
tree | badb35d03992b72b273a214ce9ec746d4c838b54 /lib | |
parent | d857e7dc0d816b635a7ead09c3273f8c2d2434be (diff) | |
download | public-inbox-4de32cbee1bab278a15cd83e7c620de0d7777be5.tar.gz |
Both the C and pure Perl implementions of `pi_fork_exec' returns `-1' on error, not `undef'.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/PublicInbox/Spawn.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/PublicInbox/Spawn.pm b/lib/PublicInbox/Spawn.pm index 2d9f734c..ad6be187 100644 --- a/lib/PublicInbox/Spawn.pm +++ b/lib/PublicInbox/Spawn.pm @@ -210,7 +210,7 @@ sub spawn ($;$$) { } my $cd = $opts->{'-C'} // ''; # undef => NULL mapping doesn't work? my $pid = pi_fork_exec($redir, $f, $cmd, \@env, $rlim, $cd); - die "fork_exec failed: $!\n" unless defined $pid; + die "fork_exec failed: $!\n" unless $pid > 0; $pid; } |