* [PATCH 2/1] spawn: fail properly if Inline fails
@ 2016-02-27 22:19 7% ` Eric Wong
0 siblings, 0 replies; 1+ results
From: Eric Wong @ 2016-02-27 22:19 UTC (permalink / raw)
To: meta
We must stash the error correctly when nesting evals, oops :x
---
lib/PublicInbox/Spawn.pm | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/PublicInbox/Spawn.pm b/lib/PublicInbox/Spawn.pm
index 394a0b4..72cd6c3 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";
--
EW
^ permalink raw reply related [relevance 7%]
Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2016-02-27 2:14 [PATCH] initial spawn implementation using vfork Eric Wong
2016-02-27 11:00 ` [PATCH v2] " Eric Wong
2016-02-27 22:19 7% ` [PATCH 2/1] spawn: fail properly if Inline fails Eric Wong
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).