-/* kern_proc.c 3.14 %G% */
+/* kern_proc.c 3.16 %G% */
#include "../h/param.h"
#include "../h/systm.h"
plock(u.u_rdir);
iput(u.u_rdir);
}
+ u.u_limit[LIM_FSIZE] = INFINITY;
acct();
vrelpt(u.u_procp);
vrelu(u.u_procp, 0);
if(q->p_pptr == p) {
q->p_pptr = &proc[1];
q->p_ppid = 1;
- q->p_flag |= SDETACH;
wakeup((caddr_t)&proc[1]);
/*
* Traced processes are killed
* since their existence means someone is screwing up.
- * Traced processes are sent a hangup and a continue.
+ * Stopped processes are sent a hangup and a continue.
* This is designed to be ``safe'' for setuid
* processes since they must be willing to tolerate
* hangups anyways.
}
/*
* Protect this process from future
- * tty signals, and clear TSTP/TTIN/TTOU if pending.
+ * tty signals, clear TSTP/TTIN/TTOU if pending,
+ * and set SDETACH bit on procs.
*/
spgrp(q, -1);
}
if (n < 0)
n = 0;
d = clrnd(n - u.u_dsize);
+ if (u.u_dsize+d > u.u_limit[LIM_DATA]) {
+ u.u_error = ENOMEM;
+ return;
+ }
if (chksize(u.u_tsize, u.u_dsize+d, u.u_ssize))
return;
if (swpexpand(u.u_dsize+d, u.u_ssize, &u.u_dmap, &u.u_smap)==0)