aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_install/lib
diff options
context:
space:
mode:
authorJordan K. Hubbard <jkh@FreeBSD.org>1995-04-26 07:43:35 +0000
committerJordan K. Hubbard <jkh@FreeBSD.org>1995-04-26 07:43:35 +0000
commit8d006a838c03f50fb310a6b48dd4b0ec442a5d92 (patch)
tree956bb8797dd442a25e12e30191cbe71146418c81 /usr.sbin/pkg_install/lib
parent2320728f4671642bacebb7efa275c032e2139c2d (diff)
Notes
Diffstat (limited to 'usr.sbin/pkg_install/lib')
-rw-r--r--usr.sbin/pkg_install/lib/pen.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/usr.sbin/pkg_install/lib/pen.c b/usr.sbin/pkg_install/lib/pen.c
index 07ba4aa1c9cb..37f36ce2ab93 100644
--- a/usr.sbin/pkg_install/lib/pen.c
+++ b/usr.sbin/pkg_install/lib/pen.c
@@ -1,5 +1,5 @@
#ifndef lint
-static const char *rcsid = "$Id: pen.c,v 1.11 1995/04/21 06:30:41 jkh Exp $";
+static const char *rcsid = "$Id: pen.c,v 1.12 1995/04/22 13:58:44 jkh Exp $";
#endif
/*
@@ -23,6 +23,7 @@ static const char *rcsid = "$Id: pen.c,v 1.11 1995/04/21 06:30:41 jkh Exp $";
*/
#include "lib.h"
+#include <sys/signal.h>
#include <sys/param.h>
#include <sys/mount.h>
@@ -72,6 +73,10 @@ make_playpen(char *pen, size_t sz)
void
leave_playpen(void)
{
+ void (*oldsig)(int);
+
+ /* Don't interrupt while we're cleaning up */
+ oldsig = signal(SIGINT, SIG_IGN);
if (Cwd[0]) {
if (chdir(Cwd) == FAIL)
barf("Can't chdir back to '%s'.", Cwd);
@@ -79,6 +84,7 @@ leave_playpen(void)
fprintf(stderr, "Couldn't remove temporary dir '%s'\n", Pen);
Cwd[0] = '\0';
}
+ signal(SIGINT, oldsig);
}
/* Accessor function for telling us where the pen is */