diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2006-03-07 13:25:06 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2006-03-07 13:25:06 +0000 |
commit | b4020dcf786c9b36705e9e464476c3719d51939f (patch) | |
tree | 33723651b5e90d99ecc582ecd065954e032dad7f /usr.sbin/pkg_add/OpenBSD | |
parent | f5704b6c5260288b93d33f2b97fb18f5481fb462 (diff) |
only the grand child can have issues
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PackageRepository/SCP.pm | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackageRepository/SCP.pm b/usr.sbin/pkg_add/OpenBSD/PackageRepository/SCP.pm index cf7cf09dd67..a1a79950753 100644 --- a/usr.sbin/pkg_add/OpenBSD/PackageRepository/SCP.pm +++ b/usr.sbin/pkg_add/OpenBSD/PackageRepository/SCP.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: SCP.pm,v 1.2 2006/03/07 11:03:17 espie Exp $ +# $OpenBSD: SCP.pm,v 1.3 2006/03/07 13:25:05 espie Exp $ # # Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org> # @@ -163,14 +163,12 @@ sub close { my ($self, $object, $hint) = @_; close($object->{fh}) if defined $object->{fh}; - # XXX we have to make sure the children are dead. - for my $child (qw(pid pid2)) { - if (defined $object->{$child}) { - my $sleep = 0.05; - while (kill 0 => $object->{$child}) { - sleep($sleep); - $sleep *= 2; - } + # XXX we have to make sure the grand-child is dead. + if (defined $object->{pid2}) { + my $sleep = 0.05; + while (kill 0 => $object->{pid2}) { + sleep($sleep); + $sleep *= 2; } } |