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
make it look like kernel driver
[unix-history]
/
usr
/
src
/
bin
/
csh
/
proc.c
diff --git
a/usr/src/bin/csh/proc.c
b/usr/src/bin/csh/proc.c
index
d669cf5
..
e0c9aa5
100644
(file)
--- a/
usr/src/bin/csh/proc.c
+++ b/
usr/src/bin/csh/proc.c
@@
-5,7
+5,7
@@
*/
#ifndef lint
*/
#ifndef lint
-static char *sccsid = "@(#)proc.c 5.
4
(Berkeley) %G%";
+static char *sccsid = "@(#)proc.c 5.
5
(Berkeley) %G%";
#endif
#include "sh.h"
#endif
#include "sh.h"
@@
-585,8
+585,9
@@
pprint(pp, flag)
case PINTERRUPTED:
case PSTOPPED:
case PSIGNALED:
case PINTERRUPTED:
case PSTOPPED:
case PSIGNALED:
- if (flag&REASON || reason != SIGINT ||
- reason != SIGPIPE)
+ if ((flag&(REASON|AREASON))
+ && reason != SIGINT
+ && reason != SIGPIPE)
printf(format, mesg[pp->p_reason].pname);
break;
printf(format, mesg[pp->p_reason].pname);
break;
@@
-789,7
+790,7
@@
dokill(v)
}
if (digit(v[0][1])) {
signum = atoi(v[0]+1);
}
if (digit(v[0][1])) {
signum = atoi(v[0]+1);
- if (signum <
1
|| signum > NSIG)
+ if (signum <
0
|| signum > NSIG)
bferr("Bad signal number");
} else {
name = &v[0][1];
bferr("Bad signal number");
} else {
name = &v[0][1];
@@
-847,7
+848,7
@@
pkill(v, signum)
}
if (signum == SIGTERM || signum == SIGHUP)
(void) killpg(pp->p_jobid, SIGCONT);
}
if (signum == SIGTERM || signum == SIGHUP)
(void) killpg(pp->p_jobid, SIGCONT);
- } else if (!
digit(*cp
))
+ } else if (!
(digit(*cp) || *cp == '-'
))
bferr("Arguments should be jobs or process id's");
else {
pid = atoi(cp);
bferr("Arguments should be jobs or process id's");
else {
pid = atoi(cp);
@@
-1076,8
+1077,7
@@
pfork(t, wanttty)
if (t->t_dflg & FNOHUP)
(void) signal(SIGHUP, SIG_IGN);
if (t->t_dflg & FNICE)
if (t->t_dflg & FNOHUP)
(void) signal(SIGHUP, SIG_IGN);
if (t->t_dflg & FNICE)
- (void) setpriority(PRIO_PROCESS, 0,
- getpriority(PRIO_PROCESS, 0) + t->t_nice);
+ (void) setpriority(PRIO_PROCESS, 0, t->t_nice);
} else {
palloc(pid, t);
(void) sigsetmask(omask);
} else {
palloc(pid, t);
(void) sigsetmask(omask);