summaryrefslogtreecommitdiff
path: root/proc/mgt.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1994-06-11 15:20:26 +0000
committerRoland McGrath <roland@gnu.org>1994-06-11 15:20:26 +0000
commita11d7ab58e11910e090fea0df0f141c9b0da7597 (patch)
tree762d8abf8384abb0617192cafa1f68f2a16350f3 /proc/mgt.c
parent1a273334236ddcf7e822d78e5b1b2b7a7104f627 (diff)
Formerly mgt.c.~10~
Diffstat (limited to 'proc/mgt.c')
-rw-r--r--proc/mgt.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/proc/mgt.c b/proc/mgt.c
index d18facbd..728233c1 100644
--- a/proc/mgt.c
+++ b/proc/mgt.c
@@ -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,