From 307f671e8706fc3004c9e481d613672d61e5655f Mon Sep 17 00:00:00 2001 From: Marc Espie Date: Sun, 9 Feb 2014 11:14:00 +0000 Subject: do a better job in wipe_info: close files and reap children. also wipe every state variable... fixes reget update_info in fringe cases (this should fix nigel@'s problems...) --- usr.sbin/pkg_add/OpenBSD/PackageLocation.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'usr.sbin') diff --git a/usr.sbin/pkg_add/OpenBSD/PackageLocation.pm b/usr.sbin/pkg_add/OpenBSD/PackageLocation.pm index 2ecd6583ae5..efd0becca4d 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.36 2014/02/02 23:09:56 espie Exp $ +# $OpenBSD: PackageLocation.pm,v 1.37 2014/02/09 11:13:59 espie Exp $ # # Copyright (c) 2003-2007 Marc Espie # @@ -207,9 +207,9 @@ sub wipe_info { my $self = shift; $self->{repository}->wipe_info($self); + $self->{repository}->close_now($self); delete $self->{contents}; $self->deref; - delete $self->{_current_name}; delete $self->{update_info}; } @@ -278,10 +278,11 @@ sub deref { my $self = shift; delete $self->{fh}; - delete $self->{pid}; delete $self->{pid2}; delete $self->{_archive}; delete $self->{_current}; + delete $self->{_current_name}; + delete $self->{_unput}; } # proxy for archive operations -- cgit v1.2.3