summaryrefslogtreecommitdiffstats
path: root/perl-install/network
diff options
context:
space:
mode:
authordamien <damien@mandriva.com>2001-12-04 15:42:47 +0000
committerdamien <damien@mandriva.com>2001-12-04 15:42:47 +0000
commit34fb312bacec318526b169c74f33c68bf3495ce8 (patch)
tree691eb27de6585e4186bbe289ddc28b2d33e27c4b /perl-install/network
parent4ea909d089bcf223822d2370f022c30924dc216b (diff)
downloaddrakx-backup-do-not-use-34fb312bacec318526b169c74f33c68bf3495ce8.tar
drakx-backup-do-not-use-34fb312bacec318526b169c74f33c68bf3495ce8.tar.gz
drakx-backup-do-not-use-34fb312bacec318526b169c74f33c68bf3495ce8.tar.bz2
drakx-backup-do-not-use-34fb312bacec318526b169c74f33c68bf3495ce8.tar.xz
drakx-backup-do-not-use-34fb312bacec318526b169c74f33c68bf3495ce8.zip
corrected pipe reading
Diffstat (limited to 'perl-install/network')
-rw-r--r--perl-install/network/tools.pm7
1 files changed, 3 insertions, 4 deletions
diff --git a/perl-install/network/tools.pm b/perl-install/network/tools.pm
index 33c4f300c..3a11daeb4 100644
--- a/perl-install/network/tools.pm
+++ b/perl-install/network/tools.pm
@@ -124,11 +124,11 @@ sub connected_bg {
*F = *$kid_pipe;
fcntl(F, c::F_SETFL(), c::O_NONBLOCK()) or die "can't fcntl F_SETFL: $!";
my $a;
- if ($a = <F> ) {
+ if (defined($a = <F>)) {
close($kid_pipe) || warn "kid exited $?";
undef $kid_pipe;
- $a eq '1' and $$ref = 1;
- $a eq '0' and $$ref = 0;
+ print STDERR "debug - hostname result : $a\n"
+ $$ref = $a;
}
} else { $kid_pipe = connected2() }
1;
@@ -140,7 +140,6 @@ sub connected2 {
return \*KID_TO_READ;
} else { # child
my $a = gethostbyname("mandrakesoft.com") ? 1 : 0;
- print "$a";
c::_exit(0);
}
}