diff options
author | Eric Wong <e@80x24.org> | 2016-02-27 22:18:04 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2016-02-27 22:18:04 +0000 |
commit | e6a02743e6411d6e70e4b72e749694445f9ff6db (patch) | |
tree | 3a21681e29dd237f8b095bb846bcc11ebcd7fb29 | |
parent | 052f26f3ada1042afa5acadbecc48b487f4e2d52 (diff) | |
download | public-inbox-e6a02743e6411d6e70e4b72e749694445f9ff6db.tar.gz |
We must stash the error correctly when nesting evals, oops :x
-rw-r--r-- | lib/PublicInbox/Spawn.pm | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/PublicInbox/Spawn.pm b/lib/PublicInbox/Spawn.pm index 394a0b45..72cd6c3c 100644 --- a/lib/PublicInbox/Spawn.pm +++ b/lib/PublicInbox/Spawn.pm @@ -111,7 +111,9 @@ if (defined $vfork_spawn) { open my $fh, '>', $f or die "failed to open $f: $!\n"; flock($fh, LOCK_EX) or die "LOCK_EX failed on $f: $!\n"; eval 'use Inline C => $vfork_spawn'; + my $err = $@; flock($fh, LOCK_UN) or die "LOCK_UN failed on $f: $!\n"; + die $err if $err; }; if ($@) { warn "Inline::C failed for vfork: $@\n"; |