diff options
author | Roland McGrath <roland@gnu.org> | 1994-06-11 15:20:26 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 1994-06-11 15:20:26 +0000 |
commit | a11d7ab58e11910e090fea0df0f141c9b0da7597 (patch) | |
tree | 762d8abf8384abb0617192cafa1f68f2a16350f3 /proc/mgt.c | |
parent | 1a273334236ddcf7e822d78e5b1b2b7a7104f627 (diff) |
Formerly mgt.c.~10~
Diffstat (limited to 'proc/mgt.c')
-rw-r--r-- | proc/mgt.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -129,7 +129,7 @@ S_proc_reauthenticate (struct proc *p, int id) /* Implement proc_child as described in <hurd/proc.defs>. */ kern_return_t S_proc_child (struct proc *parentp, - task_t childt) + task_t childt) { struct proc *childp = task_find (childt); @@ -176,6 +176,13 @@ S_proc_child (struct proc *parentp, childp->p_pgrp = parentp->p_pgrp; join_pgrp (childp); + if (childp->p_argv == 0 && childp->p_envp == 0) + { + /* Inherit the argv and envp values from the parent. */ + childp->p_argv = parentp->p_argv; + childp->p_envp = parentp->p_envp; + } + childp->p_parentset = 1; if (childp->p_msgport) nowait_proc_newids (childp->p_msgport, childp->p_task, |