projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ec_rxstart doesn't eists
[unix-history]
/
usr
/
src
/
sys
/
kern
/
kern_fork.c
diff --git
a/usr/src/sys/kern/kern_fork.c
b/usr/src/sys/kern/kern_fork.c
index
96e040b
..
9d2ea84
100644
(file)
--- a/
usr/src/sys/kern/kern_fork.c
+++ b/
usr/src/sys/kern/kern_fork.c
@@
-4,7
+4,7
@@
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)kern_fork.c 7.
27
(Berkeley) %G%
+ * @(#)kern_fork.c 7.
31
(Berkeley) %G%
*/
#include "param.h"
*/
#include "param.h"
@@
-16,7
+16,6
@@
#include "proc.h"
#include "resourcevar.h"
#include "vnode.h"
#include "proc.h"
#include "resourcevar.h"
#include "vnode.h"
-#include "seg.h"
#include "file.h"
#include "acct.h"
#include "ktrace.h"
#include "file.h"
#include "acct.h"
#include "ktrace.h"
@@
-61,7
+60,7
@@
fork1(p1, isvfork, retval)
count++;
}
/*
count++;
}
/*
- * Although process entries are dynamically
entries
,
+ * Although process entries are dynamically
created
,
* we still keep a global limit on the maximum number
* we will create. Don't allow a nonprivileged user
* to exceed its current limit or to bring us within one
* we still keep a global limit on the maximum number
* we will create. Don't allow a nonprivileged user
* to exceed its current limit or to bring us within one
@@
-146,6
+145,10
@@
again:
(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_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.
/*
* Duplicate sub-structures as needed.
@@
-155,6
+158,7
@@
again:
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_cred->p_refcnt = 1;
crhold(p1->p_ucred);
p2->p_fd = fdcopy(p1);
crhold(p1->p_ucred);
p2->p_fd = fdcopy(p1);