From 4fc617fee674543e3c7f578616c63cbc1fa1e341 Mon Sep 17 00:00:00 2001 From: "Michael I. Bushnell" Date: Mon, 8 Jul 1996 01:25:56 +0000 Subject: (fshelp_fetch_root): Don't use unsafe MOVE_SEND in call to fshelp_start_translator_long. --- libfshelp/fetch-root.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libfshelp/fetch-root.c b/libfshelp/fetch-root.c index b1813fd8..b38b276d 100644 --- a/libfshelp/fetch-root.c +++ b/libfshelp/fetch-root.c @@ -38,6 +38,7 @@ fshelp_fetch_root (struct transbox *box, void *cookie, error_t err; mach_port_t control; int cancel; + int i; start_over: @@ -128,12 +129,16 @@ fshelp_fetch_root (struct transbox *box, void *cookie, err = fshelp_start_translator_long (fetch_underlying, argz, argz, argz_len, - fds, MACH_MSG_TYPE_MOVE_SEND, + fds, MACH_MSG_TYPE_COPY_SEND, STDERR_FILENO + 1, - ports, MACH_MSG_TYPE_MOVE_SEND, + ports, MACH_MSG_TYPE_COPY_SEND, INIT_PORT_MAX, ints, INIT_INT_MAX, 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]); mutex_lock (box->lock); -- cgit v1.2.3