summaryrefslogtreecommitdiff
path: root/libfshelp/fetch-root.c
diff options
context:
space:
mode:
authorThomas Bushnell <thomas@gnu.org>1999-04-30 11:03:34 +0000
committerThomas Bushnell <thomas@gnu.org>1999-04-30 11:03:34 +0000
commit91c0bb0d6d1e8f55bb9f10b3a9068c9677ede0ee (patch)
tree1271325760bfb6d77d9bc3e0223d6e05699da5dd /libfshelp/fetch-root.c
parent782fb3b67896167c3df8d985b0003609bc116bef (diff)
Wed Apr 28 03:06:19 1999 Thomas Bushnell, BSG <tb@mit.edu>
* fetch-root.c (fshelp_fetch_root): Don't deallocate the INIT_PORT_CWDIR after starting the passive translator; we still need to keep our reference around until the getroot call happens. Reported by Marcus Brinkmann (Marcus.Brinkmann@ruhr-uni-bochum.de).
Diffstat (limited to 'libfshelp/fetch-root.c')
-rw-r--r--libfshelp/fetch-root.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libfshelp/fetch-root.c b/libfshelp/fetch-root.c
index 76839993..f5971a6f 100644
--- a/libfshelp/fetch-root.c
+++ b/libfshelp/fetch-root.c
@@ -136,8 +136,10 @@ fshelp_fetch_root (struct transbox *box, void *cookie,
0, &control);
for (i = 0; i <= STDERR_FILENO; i++)
mach_port_deallocate (mach_task_self (), fds[i]);
+
for (i = 0; i < INIT_PORT_MAX; i++)
- mach_port_deallocate (mach_task_self (), ports[i]);
+ if (i != INIT_PORT_CWDIR)
+ mach_port_deallocate (mach_task_self (), ports[i]);
mutex_lock (box->lock);