SCCS-vsn: sys/kern/kern_sysctl.c 7.23
SCCS-vsn: sys/kern/kern_fork.c 7.37
SCCS-vsn: sys/kern/kern_ktrace.c 7.19
SCCS-vsn: sys/kern/kern_sig.c 7.49
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)kern_fork.c 7.36 (Berkeley) %G%
+ * @(#)kern_fork.c 7.37 (Berkeley) %G%
count = 0;
if ((uid = p1->p_ucred->cr_uid) != 0) {
count = 0;
if ((uid = p1->p_ucred->cr_uid) != 0) {
- for (p2 = allproc; p2; p2 = p2->p_nxt)
+ for (p2 = (struct proc *)allproc; p2; p2 = p2->p_nxt)
if (p2->p_ucred->cr_uid == uid)
count++;
for (p2 = zombproc; p2; p2 = p2->p_nxt)
if (p2->p_ucred->cr_uid == uid)
count++;
for (p2 = zombproc; p2; p2 = p2->p_nxt)
* is in use. Remember the lowest pid that's greater
* than nextpid, so we can avoid checking for a while.
*/
* is in use. Remember the lowest pid that's greater
* than nextpid, so we can avoid checking for a while.
*/
+ p2 = (struct proc *)allproc;
again:
for (; p2 != NULL; p2 = p2->p_nxt) {
while (p2->p_pid == nextpid ||
again:
for (; p2 != NULL; p2 = p2->p_nxt) {
while (p2->p_pid == nextpid ||
p2 = newproc;
p2->p_stat = SIDL; /* protect against others */
p2->p_pid = nextpid;
p2 = newproc;
p2->p_stat = SIDL; /* protect against others */
p2->p_pid = nextpid;
+ p2->p_nxt = (struct proc *)allproc;
p2->p_nxt->p_prev = &p2->p_nxt; /* allproc is never NULL */
p2->p_nxt->p_prev = &p2->p_nxt; /* allproc is never NULL */
+ p2->p_prev = (struct proc **)&allproc;
allproc = p2;
p2->p_link = NULL; /* shouldn't be necessary */
p2->p_rlink = NULL; /* shouldn't be necessary */
allproc = p2;
p2->p_link = NULL; /* shouldn't be necessary */
p2->p_rlink = NULL; /* shouldn't be necessary */
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)kern_ktrace.c 7.18 (Berkeley) %G%
+ * @(#)kern_ktrace.c 7.19 (Berkeley) %G%
* Clear all uses of the tracefile
*/
if (ops == KTROP_CLEARFILE) {
* Clear all uses of the tracefile
*/
if (ops == KTROP_CLEARFILE) {
- for (p = allproc; p != NULL; p = p->p_nxt) {
+ for (p = (struct proc *)allproc; p != NULL; p = p->p_nxt) {
if (p->p_tracep == vp) {
if (ktrcanset(curp, p)) {
p->p_tracep = NULL;
if (p->p_tracep == vp) {
if (ktrcanset(curp, p)) {
p->p_tracep = NULL;
*/
log(LOG_NOTICE, "ktrace write failed, errno %d, tracing stopped\n",
error);
*/
log(LOG_NOTICE, "ktrace write failed, errno %d, tracing stopped\n",
error);
- for (p = allproc; p != NULL; p = p->p_nxt) {
+ for (p = (struct proc *)allproc; p != NULL; p = p->p_nxt) {
if (p->p_tracep == vp) {
p->p_tracep = NULL;
p->p_traceflag = 0;
if (p->p_tracep == vp) {
p->p_tracep = NULL;
p->p_traceflag = 0;
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)kern_sig.c 7.48 (Berkeley) %G%
+ * @(#)kern_sig.c 7.49 (Berkeley) %G%
*/
#define SIGPROP /* include signal properties table */
*/
#define SIGPROP /* include signal properties table */
- for (p = allproc; p != NULL; p = p->p_nxt) {
+ for (p = (struct proc *)allproc; p != NULL; p = p->p_nxt) {
if (p->p_pid <= 1 || p->p_flag&SSYS ||
p == cp || !CANSIGNAL(cp, pc, p, signo))
continue;
if (p->p_pid <= 1 || p->p_flag&SSYS ||
p == cp || !CANSIGNAL(cp, pc, p, signo))
continue;
*
* %sccs.include.redist.c%
*
*
* %sccs.include.redist.c%
*
- * @(#)kern_sysctl.c 7.22 (Berkeley) %G%
+ * @(#)kern_sysctl.c 7.23 (Berkeley) %G%
struct eproc eproc;
int error = 0;
struct eproc eproc;
int error = 0;
+ p = (struct proc *)allproc;
doingzomb = 0;
again:
for (; p != NULL; p = p->p_nxt) {
doingzomb = 0;
again:
for (; p != NULL; p = p->p_nxt) {