diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2006-03-07 10:59:28 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2006-03-07 10:59:28 +0000 |
commit | a39f70aa554d318af1e11c6495b7f68943f5f25e (patch) | |
tree | 134ad39cecf6d419bb2a841465e15120e6634c13 /usr.sbin/pkg_add/OpenBSD | |
parent | b15638af6a19626b33d2fdf46ffb49382f4afef8 (diff) |
pass the grandchild pid through the pipe, in order to be able to monitor it.
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PackageLocation.pm | 3 | ||||
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PackageRepository.pm | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackageLocation.pm b/usr.sbin/pkg_add/OpenBSD/PackageLocation.pm index 54b794143d0..a2444fce895 100644 --- a/usr.sbin/pkg_add/OpenBSD/PackageLocation.pm +++ b/usr.sbin/pkg_add/OpenBSD/PackageLocation.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: PackageLocation.pm,v 1.2 2006/03/06 12:06:37 espie Exp $ +# $OpenBSD: PackageLocation.pm,v 1.3 2006/03/07 10:59:27 espie Exp $ # # Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org> # @@ -229,6 +229,7 @@ sub deref my $self = shift; $self->{fh} = undef; $self->{pid} = undef; + $self->{pid2} = undef; $self->{_archive} = undef; } diff --git a/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm b/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm index ddda9fcf9c7..ffa3b3c8cd3 100644 --- a/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm +++ b/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: PackageRepository.pm,v 1.4 2006/03/06 12:00:28 espie Exp $ +# $OpenBSD: PackageRepository.pm,v 1.5 2006/03/07 10:59:27 espie Exp $ # # Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org> # @@ -413,6 +413,7 @@ sub open_pipe } if ($pid) { $object->{pid} = $pid; + $object->{pid2} = <$fh>; return $fh; } else { open STDERR, '>', $object->{errors}; @@ -423,6 +424,7 @@ sub open_pipe die "Cannot fork: $!"; } if ($pid2) { + print $pid2, "\n"; exec {"/usr/bin/gzip"} "gzip", "-d", |