summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bushnell <thomas@gnu.org>2000-03-17 17:26:00 +0000
committerThomas Bushnell <thomas@gnu.org>2000-03-17 17:26:00 +0000
commit2ebda554322e77aa2b53682c58312f21ef61a78b (patch)
tree5ba2ff7bdac280deba50398834971581e75c994c
parent540406a2093f6803c508120f65e3ba80da1ec5ba (diff)
2000-03-17 Thomas Bushnell, BSG <tb@mit.edu>
* main.c (main): Don't use MAKE_SEND in Hurd RPC.
-rw-r--r--term/main.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/term/main.c b/term/main.c
index db23ef5b..8d35a679 100644
--- a/term/main.c
+++ b/term/main.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1997, 2000 Free Software Foundation, Inc.
Written by Michael I. Bushnell, p/BSG.
This file is part of the GNU Hurd.
@@ -53,7 +53,7 @@ main (int argc, char **argv)
struct port_class *ourclass, *ourcntlclass;
struct port_class *peerclass, *peercntlclass;
struct trivfs_control **ourcntl, **peercntl;
- mach_port_t bootstrap;
+ mach_port_t bootstrap, right;
enum {T_DEVICE, T_PTYMASTER, T_PTYSLAVE} type;
struct stat st;
@@ -150,10 +150,12 @@ main (int argc, char **argv)
errno = trivfs_create_control (file, peercntlclass, term_bucket,
peerclass, term_bucket, peercntl);
if (! errno)
- errno = file_set_translator (file, 0, FS_TRANS_EXCL | FS_TRANS_SET,
- 0, 0, 0,
- ports_get_right (*peercntl),
- MACH_MSG_TYPE_MAKE_SEND);
+ {
+ right = ports_get_send_right (*peercntl);
+ errno = file_set_translator (file, 0, FS_TRANS_EXCL | FS_TRANS_SET,
+ 0, 0, 0, right, MACH_MSG_TYPE_COPY_SEND);
+ mach_port_deallocate (mach_task_self (), right);
+ }
if (errno)
{