aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMartin Schlemmer <azarah@gentoo.org>2002-08-31 19:32:19 +0000
committerMartin Schlemmer <azarah@gentoo.org>2002-08-31 19:32:19 +0000
commitef6ae172b5222a77e55467ab5eda228f439d9ac1 (patch)
tree426619d81b682a35ade5258d35e44bfaeb83e749 /src
parentmake inherit() always do its job, because that if statement broke it and it _... (diff)
downloadportage-cvs-ef6ae172b5222a77e55467ab5eda228f439d9ac1.tar.gz
portage-cvs-ef6ae172b5222a77e55467ab5eda228f439d9ac1.tar.bz2
portage-cvs-ef6ae172b5222a77e55467ab5eda228f439d9ac1.zip
remove pidsfile if last sandbox
Diffstat (limited to 'src')
-rw-r--r--src/sandbox-1.1/ChangeLog7
-rw-r--r--src/sandbox-1.1/sandbox.c15
2 files changed, 17 insertions, 5 deletions
diff --git a/src/sandbox-1.1/ChangeLog b/src/sandbox-1.1/ChangeLog
index 1377dbc..1344ee0 100644
--- a/src/sandbox-1.1/ChangeLog
+++ b/src/sandbox-1.1/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for Path Sandbox
# Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL v2
-# $Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/src/sandbox-1.1/Attic/ChangeLog,v 1.2 2002/08/26 19:40:30 azarah Exp $
+# $Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/src/sandbox-1.1/Attic/ChangeLog,v 1.3 2002/08/31 19:32:19 azarah Exp $
+
+ 31 Aug 2002; Martin Schlemmer <azarah@gentoo.org> :
+
+ Update cleanup() in sandbox.c to remove the PIDSFILE if this is
+ the last sandbox running.
25 Aug 2002; Martin Schlemmer <azarah@gentoo.org> :
diff --git a/src/sandbox-1.1/sandbox.c b/src/sandbox-1.1/sandbox.c
index 8b68dfe..8696fc0 100644
--- a/src/sandbox-1.1/sandbox.c
+++ b/src/sandbox-1.1/sandbox.c
@@ -11,7 +11,7 @@
** Copyright (C) 2001 Geert Bevin, Uwyn, http://www.uwyn.com
** Distributed under the terms of the GNU General Public License, v2 or later
** Author : Geert Bevin <gbevin@uwyn.com>
-** $Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/src/sandbox-1.1/Attic/sandbox.c,v 1.2 2002/08/26 19:40:31 azarah Exp $
+** $Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/src/sandbox-1.1/Attic/sandbox.c,v 1.3 2002/08/31 19:32:19 azarah Exp $
*/
#define _GNU_SOURCE
@@ -238,15 +238,22 @@ void cleanup()
break;
}
}
+
+ file_close(pids_file);
+ pids_file = -1;
+ } else {
+
+ file_close(pids_file);
+ pids_file = -1;
+
+ /* remove the pidsfile, as this was the last sandbox */
+ unlink(PIDS_FILE);
}
if (pids_array != NULL) {
free(pids_array);
pids_array = NULL;
}
-
- file_close(pids_file);
- pids_file = -1;
}
if (0 == success) {