diff options
-rw-r--r-- | proc/main.c | 2 | ||||
-rw-r--r-- | proc/mgt.c | 9 |
2 files changed, 5 insertions, 6 deletions
diff --git a/proc/main.c b/proc/main.c index eecb15e6..8a2dc9ff 100644 --- a/proc/main.c +++ b/proc/main.c @@ -219,8 +219,8 @@ main (int argc, char **argv, char **envp) _hurd_port_set (&_hurd_ports[INIT_PORT_AUTH], authserver); mach_port_deallocate (mach_task_self (), boot); - proc_death_notify (startup_proc); add_proc_to_hash (startup_proc); /* Now that we have the task port. */ + proc_death_notify (startup_proc); /* Set our own argv and envp locations. */ self_proc->p_argv = (vm_address_t) argv; @@ -926,11 +926,10 @@ complete_proc (struct proc *p, pid_t pid) defer registering death notifications and adding it to the hash tables. */ if (pid != HURD_PID_STARTUP) - { - proc_death_notify (p); - add_proc_to_hash (p); - } + add_proc_to_hash (p); join_pgrp (p); + if (pid != HURD_PID_STARTUP) + proc_death_notify (p); } @@ -1282,8 +1281,8 @@ S_proc_set_init_task(struct proc *callerp, } init_proc->p_task = task; - proc_death_notify (init_proc); add_proc_to_hash (init_proc); + proc_death_notify (init_proc); return 0; } |