SCCS-vsn: sys/kern/kern_fork.c 7.36
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)kern_fork.c 7.35 (Berkeley) %G%
+ * @(#)kern_fork.c 7.36 (Berkeley) %G%
(unsigned) ((caddr_t)&p2->p_endzero - (caddr_t)&p2->p_startzero));
bcopy(&p1->p_startcopy, &p2->p_startcopy,
(unsigned) ((caddr_t)&p2->p_endcopy - (caddr_t)&p2->p_startcopy));
(unsigned) ((caddr_t)&p2->p_endzero - (caddr_t)&p2->p_startzero));
bcopy(&p1->p_startcopy, &p2->p_startcopy,
(unsigned) ((caddr_t)&p2->p_endcopy - (caddr_t)&p2->p_startcopy));
- p2->p_wmesg = NULL; /* XXX - should be in zero range */
- p2->p_spare[0] = 0; /* XXX - should be in zero range */
- p2->p_spare[1] = 0; /* XXX - should be in zero range */
- p2->p_spare[2] = 0; /* XXX - should be in zero range */
- p2->p_spare[3] = 0; /* XXX - should be in zero range */
/*
* Duplicate sub-structures as needed.
* Increase reference counts on shared objects.
* The p_stats and p_sigacts substructs are set in vm_fork.
*/
/*
* Duplicate sub-structures as needed.
* Increase reference counts on shared objects.
* The p_stats and p_sigacts substructs are set in vm_fork.
*/
+ p2->p_flag = SLOAD | (p1->p_flag & SHPUX);
+ if (p1->p_flag & SPROFIL)
+ startprofclock(p2);
MALLOC(p2->p_cred, struct pcred *, sizeof(struct pcred),
M_SUBPROC, M_WAITOK);
bcopy(p1->p_cred, p2->p_cred, sizeof(*p2->p_cred));
MALLOC(p2->p_cred, struct pcred *, sizeof(struct pcred),
M_SUBPROC, M_WAITOK);
bcopy(p1->p_cred, p2->p_cred, sizeof(*p2->p_cred));
p2->p_limit->p_refcnt++;
}
p2->p_limit->p_refcnt++;
}
- p2->p_flag = SLOAD | (p1->p_flag & SHPUX);
if (p1->p_session->s_ttyvp != NULL && p1->p_flag & SCTTY)
p2->p_flag |= SCTTY;
if (isvfork)
if (p1->p_session->s_ttyvp != NULL && p1->p_flag & SCTTY)
p2->p_flag |= SCTTY;
if (isvfork)
-#if defined(tahoe)
- p2->p_vmspace->p_ckey = p1->p_vmspace->p_ckey; /* XXX move this */
-#endif
-
/*
* This begins the section where we must prevent the parent
* from being swapped.
/*
* This begins the section where we must prevent the parent
* from being swapped.