summaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1994-08-22 20:43:59 +0000
committerMichael I. Bushnell <mib@gnu.org>1994-08-22 20:43:59 +0000
commitdb550b76bd7185662c4d341a5cf590942e803abb (patch)
tree153607d3dcf7556a0705846600c65a8a7b1357e1 /init
parent3fbfb390dd7e52cb80df16e24588d4666fa9c9eb (diff)
Formerly init.c.~44~
Diffstat (limited to 'init')
-rw-r--r--init/init.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/init/init.c b/init/init.c
index f6b527c2..fef49c6e 100644
--- a/init/init.c
+++ b/init/init.c
@@ -294,7 +294,9 @@ run (char *server, mach_port_t *ports, task_t *task)
}
/* Run FILENAME as root with ARGS as its argv (length ARGLEN).
- Return the task that we started. */
+ Return the task that we started. If CTTY is set, then make
+ that the controlling terminal of the new process and put it in
+ its own login collection. */
task_t
run_for_real (char *filename, char *args, int arglen, mach_port_t ctty)
{
@@ -334,6 +336,7 @@ run_for_real (char *filename, char *args, int arglen, mach_port_t ctty)
term_getctty (ctty, &default_ports[INIT_PORT_CTTYID]);
proc_task2pid (procserver, task, &pid);
io_mod_owner (ctty, -pid);
+ proc_make_login_coll (default_ports[INIT_PORT_PROC]);
}
if (bootstrap_args & RB_KDB)
{
@@ -360,7 +363,6 @@ run_for_real (char *filename, char *args, int arglen, mach_port_t ctty)
default_ports[INIT_PORT_CTTYID]);
default_ports[INIT_PORT_CTTYID] = MACH_PORT_NULL;
}
-
mach_port_deallocate (mach_task_self (), file);
return err ? MACH_PORT_NULL : task;
}