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
patchable olducode varable
[unix-history]
/
usr
/
src
/
sys
/
kern
/
kern_proc.c
diff --git
a/usr/src/sys/kern/kern_proc.c
b/usr/src/sys/kern/kern_proc.c
index
1c72a95
..
1b752ac
100644
(file)
--- a/
usr/src/sys/kern/kern_proc.c
+++ b/
usr/src/sys/kern/kern_proc.c
@@
-1,4
+1,4
@@
-/* kern_proc.c 3.1
4
%G% */
+/* kern_proc.c 3.1
6
%G% */
#include "../h/param.h"
#include "../h/systm.h"
#include "../h/param.h"
#include "../h/systm.h"
@@
-467,6
+467,7
@@
exit(rv)
plock(u.u_rdir);
iput(u.u_rdir);
}
plock(u.u_rdir);
iput(u.u_rdir);
}
+ u.u_limit[LIM_FSIZE] = INFINITY;
acct();
vrelpt(u.u_procp);
vrelu(u.u_procp, 0);
acct();
vrelpt(u.u_procp);
vrelu(u.u_procp, 0);
@@
-494,12
+495,11
@@
done:
if(q->p_pptr == p) {
q->p_pptr = &proc[1];
q->p_ppid = 1;
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.
wakeup((caddr_t)&proc[1]);
/*
* Traced processes are killed
* since their existence means someone is screwing up.
- *
Trac
ed processes are sent a hangup and a continue.
+ *
Stopp
ed 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.
* This is designed to be ``safe'' for setuid
* processes since they must be willing to tolerate
* hangups anyways.
@@
-513,7
+513,8
@@
done:
}
/*
* Protect this process from future
}
/*
* 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);
}
*/
spgrp(q, -1);
}
@@
-684,6
+685,10
@@
sbreak()
if (n < 0)
n = 0;
d = clrnd(n - u.u_dsize);
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)
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)