From f6cc4e96147ba98f746da13e02a70962e659a74e Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Fri, 9 Apr 2004 11:59:49 +0000 Subject: - urpmi was ignoring the password for an http proxy - urpm.pm : check whether a fork(2) succeeded before continuing --- urpm.pm | 5 ++++- urpmi | 2 +- 2 files changed, 5 insertions(+), 2 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; } } diff --git a/urpmi b/urpmi index cdbfc8a9..485084d9 100755 --- a/urpmi +++ b/urpmi @@ -208,7 +208,7 @@ while (defined($_ = shift @argv)) { /^--proxy-user$/ and do { ($_ = shift @argv) =~ /(.+):(.+)/, or die N("bad proxy declaration on command line\n"); - @{$urpm->{proxy}}{qw(user proxy)} = ($1, $2); + @{$urpm->{proxy}}{qw(user pwd)} = ($1, $2); next; }; /^--bug$/ and do { push @nextargv, \$bug; next }; -- cgit v1.2.1