summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pkg_install/info/perform.c
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1998-02-16 17:16:51 +0000
committerjkh <jkh@FreeBSD.org>1998-02-16 17:16:51 +0000
commit7836fb80f5b1a2c27eeca9390f1b976a6886b12d (patch)
tree85a172286829ce0770e98088e0d74da47a2625af /usr.sbin/pkg_install/info/perform.c
parent3513ffecbffcc3f1fd4e7b560ae701e59685d911 (diff)
downloadFreeBSD-src-7836fb80f5b1a2c27eeca9390f1b976a6886b12d.zip
FreeBSD-src-7836fb80f5b1a2c27eeca9390f1b976a6886b12d.tar.gz
Eliminate the idea of nested "playpens" entirely - it just obfuscated
the code and, in at least one case, made it more dangerous to no gain.
Diffstat (limited to 'usr.sbin/pkg_install/info/perform.c')
-rw-r--r--usr.sbin/pkg_install/info/perform.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/usr.sbin/pkg_install/info/perform.c b/usr.sbin/pkg_install/info/perform.c
index 5625f62..1d7f14f 100644
--- a/usr.sbin/pkg_install/info/perform.c
+++ b/usr.sbin/pkg_install/info/perform.c
@@ -1,6 +1,6 @@
#ifndef lint
static const char rcsid[] =
- "$Id: perform.c,v 1.22 1997/10/08 07:47:29 charnier Exp $";
+ "$Id: perform.c,v 1.23 1997/10/13 15:03:53 jkh Exp $";
#endif
/*
@@ -192,7 +192,7 @@ pkg_do(char *pkg)
}
free_plist(&plist);
bail:
- leave_playpen(Home);
+ leave_playpen();
if (isTMP)
unlink(fname);
return code;
@@ -201,6 +201,11 @@ pkg_do(char *pkg)
void
cleanup(int sig)
{
- leave_playpen(Home);
+ static int in_cleanup = 0;
+
+ if (!in_cleanup) {
+ in_cleanup = 1;
+ leave_playpen();
+ }
exit(1);
}
OpenPOWER on IntegriCloud