summaryrefslogtreecommitdiff
path: root/libfshelp/start-translator-long.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2000-03-14 00:57:27 +0000
committerRoland McGrath <roland@gnu.org>2000-03-14 00:57:27 +0000
commit483c1ffb6f6e6c97835cb54632ec94b3c85f803d (patch)
treee5ca5003676b04f7cd86884ee1662b1a1833a83c /libfshelp/start-translator-long.c
parent765a4c2903b9c187b05dd4dac9a4a9ec97af1d55 (diff)
2000-03-13 Roland McGrath <roland@baalperazim.frob.com>
* start-translator-long.c (service_fsys_startup): If mach_msg fails with MACH_SEND_INTERRUPTED, clean up the send right in the pseudo-received request message.
Diffstat (limited to 'libfshelp/start-translator-long.c')
-rw-r--r--libfshelp/start-translator-long.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/libfshelp/start-translator-long.c b/libfshelp/start-translator-long.c
index bf576035..15fb63cb 100644
--- a/libfshelp/start-translator-long.c
+++ b/libfshelp/start-translator-long.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1995, 1996, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1995,96,99,2000 Free Software Foundation, Inc.
Written by Miles Bader and Michael I. Bushnell.
This file is part of the GNU Hurd.
@@ -160,6 +160,11 @@ service_fsys_startup (fshelp_open_fn_t underlying_open_fn,
sizeof(reply), 0,
request.head.msgh_remote_port,
MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
+ if (err == MACH_SEND_INTERRUPTED
+ && reply.realnodeType.msgt_name == MACH_MSG_TYPE_MOVE_SEND)
+ /* For MACH_SEND_INTERRUPTED, we'll have pseudo-received the message
+ and might have to clean up a generated send right. */
+ mach_port_deallocate (mach_task_self (), reply.realnode);
if (reply.RetCode)
/* Make our error return be the earlier one. */
@@ -172,7 +177,7 @@ service_fsys_startup (fshelp_open_fn_t underlying_open_fn,
error_t
fshelp_start_translator_long (fshelp_open_fn_t underlying_open_fn,
char *name, char *argz, int argz_len,
- mach_port_t *fds,
+ mach_port_t *fds,
mach_msg_type_name_t fds_type, int fds_len,
mach_port_t *ports,
mach_msg_type_name_t ports_type, int ports_len,