summaryrefslogtreecommitdiffstats
path: root/urpm.pm
diff options
context:
space:
mode:
Diffstat (limited to 'urpm.pm')
-rw-r--r--urpm.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/urpm.pm b/urpm.pm
index b77e7509..1a1901ff 100644
--- a/urpm.pm
+++ b/urpm.pm
@@ -3097,7 +3097,9 @@ sub install {
local (*CHILD_RETURNS, *ERROR_OUTPUT, $_);
if ($options{fork}) {
pipe(CHILD_RETURNS, ERROR_OUTPUT);
- if ($pid = fork()) {
+ defined($pid = fork()) or die "Can't fork: $!\n"
+ if ($pid) {
+ # parent process
close ERROR_OUTPUT;
$urpm->{log}(N("using process %d for executing transaction"));
@@ -3119,6 +3121,7 @@ sub install {
return @l;
} else {
+ # child process
close CHILD_RETURNS;
}
}