summaryrefslogtreecommitdiff
path: root/proc
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1996-07-18 22:39:37 +0000
committerMichael I. Bushnell <mib@gnu.org>1996-07-18 22:39:37 +0000
commit06ad0da69e71fa76f856fc9e5497c4163b0e99f2 (patch)
treeacb3eb1dffa838f8c36d8f30705fa28f5a1f4290 /proc
parent52cccd25aefe8385dcc3b3700692b8ba8ed5fea3 (diff)
*** empty log message ***
Diffstat (limited to 'proc')
-rw-r--r--proc/ChangeLog8
-rw-r--r--proc/mgt.c6
-rw-r--r--proc/msg.c2
3 files changed, 13 insertions, 3 deletions
diff --git a/proc/ChangeLog b/proc/ChangeLog
index 4e2613fd..a0285944 100644
--- a/proc/ChangeLog
+++ b/proc/ChangeLog
@@ -1,7 +1,13 @@
Thu Jul 18 13:23:51 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu>
- * mgt.c (S_proc_handle_exceptions): Release newly created referenc
+ * msg.c (S_proc_setmsgport): Use MOVE_SEND, not COPY_SEND, to
+ return the old message port to the caller.
+
+ * mgt.c (S_proc_handle_exceptions): Release newly created reference
on E when we are done with it.
+ (S_proc_child): Deallocate our ref on childt once we know we will
+ return success.
+ (S_proc_reassign): Likewise for NEWT.
* main.c (main): Don't wire proc anymore. It's not necessary or
useful.
diff --git a/proc/mgt.c b/proc/mgt.c
index 4b942597..e8af38d4 100644
--- a/proc/mgt.c
+++ b/proc/mgt.c
@@ -146,6 +146,8 @@ S_proc_child (struct proc *parentp,
if (childp->p_parentset)
return EBUSY;
+ mach_port_deallocate (mach_task_self (), childt);
+
/* Process identification.
Leave p_task and p_pid alone; all the rest comes from the
new parent. */
@@ -212,11 +214,13 @@ S_proc_reassign (struct proc *p,
if (stubp == p)
return EINVAL;
+ mach_port_deallocate (mach_task_self (), newt);
+
remove_proc_from_hash (p);
task_terminate (p->p_task);
mach_port_deallocate (mach_task_self (), p->p_task);
- p->p_task = newt;
+ p->p_task = stubp->p_task;
/* For security, we need use the request port from STUBP */
ports_transfer_right (p, stubp);
diff --git a/proc/msg.c b/proc/msg.c
index f7ba1b5e..701fa149 100644
--- a/proc/msg.c
+++ b/proc/msg.c
@@ -54,7 +54,7 @@ S_proc_setmsgport (struct proc *p,
return EOPNOTSUPP;
*oldmsgport = p->p_msgport;
- *oldmsgport_type = MACH_MSG_TYPE_COPY_SEND;
+ *oldmsgport_type = MACH_MSG_TYPE_MOVE_SEND;
p->p_msgport = msgport;
p->p_deadmsg = 0;