summaryrefslogtreecommitdiff
path: root/exec
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1996-07-08 01:13:09 +0000
committerMichael I. Bushnell <mib@gnu.org>1996-07-08 01:13:09 +0000
commitd3bc8291eb7f87a1a1892a4c32d4fcfa3d986f26 (patch)
treebbf9fc59296e1d1bde1ea9a441577506800747da /exec
parentf27a6c577d599a595062c6004d48798b141a77e7 (diff)
(S_exec_exec): Don't use unsafe MOVE_SEND in call to interruptible
exec_exec stub.
Diffstat (limited to 'exec')
-rw-r--r--exec/exec.c32
1 files changed, 20 insertions, 12 deletions
diff --git a/exec/exec.c b/exec/exec.c
index a74844e0..a9de454a 100644
--- a/exec/exec.c
+++ b/exec/exec.c
@@ -1745,18 +1745,26 @@ S_exec_exec (struct trivfs_protid *protid,
ports_port_deref (protid);
}
else
- err = exec_exec (server,
- file, MACH_MSG_TYPE_MOVE_SEND,
- oldtask, 0,
- argv, argvlen,
- envp, envplen,
- dtable, MACH_MSG_TYPE_MOVE_SEND,
- dtablesize,
- portarray, MACH_MSG_TYPE_MOVE_SEND,
- nports,
- intarray, nints,
- deallocnames, ndeallocnames,
- destroynames, ndestroynames);
+ {
+ int n;
+ err = exec_exec (server,
+ file, MACH_MSG_TYPE_COPY_SEND,
+ oldtask, 0,
+ argv, argvlen,
+ envp, envplen,
+ dtable, MACH_MSG_TYPE_COPY_SEND,
+ dtablesize,
+ portarray, MACH_MSG_TYPE_COPY_SEND,
+ nports,
+ intarray, nints,
+ deallocnames, ndeallocnames,
+ destroynames, ndestroynames);
+ mach_port_deallocate (mach_task_self (), file);
+ for (n = 0; n < dtablesize; n++)
+ mach_port_deallocate (mach_task_self (), dtable[n]);
+ for (n = 0; n < nports; n++)
+ mach_port_deallocate (mach_task_self (), portarray[n]);
+ }
mach_port_deallocate (mach_task_self (), server);
if (err != ENOEXEC)
return err;