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
(no message)
[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
81a4de2
..
1c72a95
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.
8 %H
% */
+/* kern_proc.c 3.
14 %G
% */
#include "../h/param.h"
#include "../h/systm.h"
#include "../h/param.h"
#include "../h/systm.h"
@@
-61,7
+61,7
@@
exece()
ne = 0;
nc = 0;
uap = (struct execa *)u.u_ap;
ne = 0;
nc = 0;
uap = (struct execa *)u.u_ap;
- if ((bno = malloc(
swap
map, ctod(clrnd((int) btoc(NCARGS))))) == 0) {
+ if ((bno = malloc(
arg
map, ctod(clrnd((int) btoc(NCARGS))))) == 0) {
swkill(u.u_procp, "exece");
goto bad;
}
swkill(u.u_procp, "exece");
goto bad;
}
@@
-99,8
+99,8
@@
exece()
if ((nc&BMASK) == 0) {
if (bp)
bdwrite(bp);
if ((nc&BMASK) == 0) {
if (bp)
bdwrite(bp);
- bp = getblk(
swap
dev,
- (daddr_t)(dbtofsb(
swplo+
bno)+(nc>>BSHIFT)));
+ bp = getblk(
arg
dev,
+ (daddr_t)(dbtofsb(bno)+(nc>>BSHIFT)));
cp = bp->b_un.b_addr;
}
nc++;
cp = bp->b_un.b_addr;
}
nc++;
@@
-114,7
+114,7
@@
exece()
if (getxfile(ip, nc) || u.u_error) {
badarg:
for (c = 0; c < nc; c += BSIZE)
if (getxfile(ip, nc) || u.u_error) {
badarg:
for (c = 0; c < nc; c += BSIZE)
- if (bp = baddr(
swapdev, dbtofsb(swplo+
bno)+(c>>BSHIFT))) {
+ if (bp = baddr(
argdev, dbtofsb(
bno)+(c>>BSHIFT))) {
bp->b_flags |= B_AGE; /* throw away */
bp->b_flags &= ~B_DELWRI; /* cancel io */
brelse(bp);
bp->b_flags |= B_AGE; /* throw away */
bp->b_flags &= ~B_DELWRI; /* cancel io */
brelse(bp);
@@
-145,7
+145,8
@@
badarg:
if ((nc&BMASK) == 0) {
if (bp)
brelse(bp);
if ((nc&BMASK) == 0) {
if (bp)
brelse(bp);
- bp = bread(swapdev, (daddr_t)(dbtofsb(swplo+bno)+(nc>>BSHIFT)));
+ bp = bread(argdev,
+ (daddr_t)(dbtofsb(bno)+(nc>>BSHIFT)));
bp->b_flags |= B_AGE; /* throw away */
bp->b_flags &= ~B_DELWRI; /* cancel io */
cp = bp->b_un.b_addr;
bp->b_flags |= B_AGE; /* throw away */
bp->b_flags &= ~B_DELWRI; /* cancel io */
cp = bp->b_un.b_addr;
@@
-161,7
+162,7
@@
bad:
if (bp)
brelse(bp);
if (bno)
if (bp)
brelse(bp);
if (bno)
- mfree(
swap
map, ctod(clrnd((int) btoc(NCARGS))), bno);
+ mfree(
arg
map, ctod(clrnd((int) btoc(NCARGS))), bno);
iput(ip);
}
iput(ip);
}
@@
-314,7
+315,7
@@
register struct inode *ip;
1 + ts/CLSIZE, (int)btoc(u.u_exdata.ux_dsize));
/* THIS SHOULD BE DONE AT A LOWER LEVEL, IF AT ALL */
1 + ts/CLSIZE, (int)btoc(u.u_exdata.ux_dsize));
/* THIS SHOULD BE DONE AT A LOWER LEVEL, IF AT ALL */
- mtpr(TBIA,
1
);
+ mtpr(TBIA,
0
);
/*
* set SUID/SGID protections, if no tracing
/*
* set SUID/SGID protections, if no tracing
@@
-438,7
+439,6
@@
exit(rv)
else
p->p_siga1 = 0;
(void) spl0();
else
p->p_siga1 = 0;
(void) spl0();
- rate.v_pgin -= p->p_aveflt;
p->p_aveflt = 0;
for(i=0; i<NSIG; i++)
u.u_signal[i] = SIG_IGN;
p->p_aveflt = 0;
for(i=0; i<NSIG; i++)
u.u_signal[i] = SIG_IGN;
@@
-471,7
+471,8
@@
exit(rv)
vrelpt(u.u_procp);
vrelu(u.u_procp, 0);
multprog--;
vrelpt(u.u_procp);
vrelu(u.u_procp, 0);
multprog--;
- spl7(); /* clock will get mad because of overlaying */
+/* spl7(); /* clock will get mad because of overlaying */
+ noproc = 1;
p->p_stat = SZOMB;
i = PIDHASH(p->p_pid);
x = p - proc;
p->p_stat = SZOMB;
i = PIDHASH(p->p_pid);
x = p - proc;
@@
-493,6
+494,7
@@
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
wakeup((caddr_t)&proc[1]);
/*
* Traced processes are killed
@@
-513,9
+515,7
@@
done:
* Protect this process from future
* tty signals, and clear TSTP/TTIN/TTOU if pending.
*/
* Protect this process from future
* tty signals, and clear TSTP/TTIN/TTOU if pending.
*/
- q->p_pgrp = 0;
-#define bit(a) (1<<(a-1))
- q->p_sig &= ~(bit(SIGTSTP)|bit(SIGTTIN)|bit(SIGTTOU));
+ spgrp(q, -1);
}
wakeup((caddr_t)p->p_pptr);
psignal(p->p_pptr, SIGCHLD);
}
wakeup((caddr_t)p->p_pptr);
psignal(p->p_pptr, SIGCHLD);