summary |
tags |
clone url |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
9706079)
SCCS-vsn: bin/csh/csh.c 4.18
SCCS-vsn: bin/csh/exec.c 4.9
SCCS-vsn: bin/csh/hist.c 4.7
SCCS-vsn: bin/csh/proc.c 4.13
SCCS-vsn: bin/csh/misc.c 4.3
SCCS-vsn: bin/csh/sem.c 4.4
SCCS-vsn: bin/csh/set.c 4.3
SCCS-vsn: bin/csh/glob.c 4.6
SCCS-vsn: bin/csh/func.c 4.12
SCCS-vsn: bin/csh/file.c 1.3
SCCS-vsn: bin/csh/csh.h 4.11
-static char *sccsid = "@(#)csh.c 4.17 %G%";
+static char *sccsid = "@(#)csh.c 4.18 %G%";
#include "sh.h"
#include <sys/ioctl.h>
#include "sh.h"
#include <sys/ioctl.h>
{
register char **v, *cp;
register int f;
{
register char **v, *cp;
register int f;
settimes(); /* Immed. estab. timing base */
v = av;
if (eq(v[0], "a.out")) /* A.out's are quittable */
quitit = 1;
uid = getuid();
settimes(); /* Immed. estab. timing base */
v = av;
if (eq(v[0], "a.out")) /* A.out's are quittable */
quitit = 1;
uid = getuid();
+ loginsh = **v == '-' && c == 1;
if (loginsh)
time(&chktim);
if (loginsh)
time(&chktim);
* Our children inherit termination from our parent.
* We catch it only if we are the login shell.
*/
* Our children inherit termination from our parent.
* We catch it only if we are the login shell.
*/
- parintr = signal(SIGINT, SIG_IGN); /* parents interruptibility */
- sigset(SIGINT, parintr); /* ... restore */
- parterm = signal(SIGTERM, SIG_IGN); /* parents terminability */
- signal(SIGTERM, parterm); /* ... restore */
+ sigvec(SIGINT, 0, &osv); /* parents interruptibility */
+ parintr = osv.sv_handler;
+ sigvec(SIGTERM, 0, &osv); /* parents terminability */
+ parterm = osv.sv_handler;
if (loginsh) {
signal(SIGHUP, phup); /* exit processing on HUP */
signal(SIGXCPU, phup); /* ...and on XCPU */
if (loginsh) {
signal(SIGHUP, phup); /* exit processing on HUP */
signal(SIGXCPU, phup); /* ...and on XCPU */
*/
c--, v++;
while (c > 0 && (cp = v[0])[0] == '-') {
*/
c--, v++;
while (c > 0 && (cp = v[0])[0] == '-') {
- case 0: /* - Interruptible, no prompt */
- prompt = 0;
- setintr++;
- nofile++;
- break;
-
case 'c': /* -c Command input from arg */
if (c == 1)
exit(0);
case 'c': /* -c Command input from arg */
if (c == 1)
exit(0);
**av = '-';
if (!quitit) /* Wary! */
signal(SIGQUIT, SIG_IGN);
**av = '-';
if (!quitit) /* Wary! */
signal(SIGQUIT, SIG_IGN);
- sigset(SIGINT, pintr);
- sighold(SIGINT);
+ signal(SIGINT, pintr);
+ sigblock(sigmask(SIGINT));
signal(SIGTERM, SIG_IGN);
if (quitit == 0 && arginp == 0) {
signal(SIGTSTP, SIG_IGN);
signal(SIGTERM, SIG_IGN);
if (quitit == 0 && arginp == 0) {
signal(SIGTSTP, SIG_IGN);
if (ioctl(f, TIOCGPGRP, &tpgrp) == 0 && tpgrp != -1) {
int ldisc;
if (tpgrp != shpgrp) {
if (ioctl(f, TIOCGPGRP, &tpgrp) == 0 && tpgrp != -1) {
int ldisc;
if (tpgrp != shpgrp) {
- int (*old)() = sigsys(SIGTTIN, SIG_DFL);
+ int (*old)() = signal(SIGTTIN, SIG_DFL);
goto retry;
}
if (ioctl(f, TIOCGETD, &oldisc) != 0)
goto retry;
}
if (ioctl(f, TIOCGETD, &oldisc) != 0)
}
if (setintr == 0 && parintr == SIG_DFL)
setintr++;
}
if (setintr == 0 && parintr == SIG_DFL)
setintr++;
- sigset(SIGCHLD, pchild); /* while signals not ready */
+ signal(SIGCHLD, pchild); /* while signals not ready */
/*
* Set an exit here in case of an interrupt or error reading
/*
* Set an exit here in case of an interrupt or error reading
/* The (few) real local variables */
jmp_buf oldexit;
/* The (few) real local variables */
jmp_buf oldexit;
getexit(oldexit);
reenter = 0;
if (setintr)
getexit(oldexit);
reenter = 0;
if (setintr)
+ omask = sigblock(sigmask(SIGINT));
setexit();
reenter++;
if (reenter == 1) {
setexit();
reenter++;
if (reenter == 1) {
* we let ourselves be interrupted.
*/
if (setintr)
* we let ourselves be interrupted.
*/
if (setintr)
#ifdef TELL
settell();
#endif
process(0); /* 0 -> blow away on errors */
}
if (setintr)
#ifdef TELL
settell();
#endif
process(0); /* 0 -> blow away on errors */
}
if (setintr)
if (oSHIN >= 0) {
register int i;
if (oSHIN >= 0) {
register int i;
{
if (loginsh) {
signal(SIGQUIT, SIG_IGN);
{
if (loginsh) {
signal(SIGQUIT, SIG_IGN);
- sigset(SIGINT, SIG_IGN);
+ signal(SIGINT, SIG_IGN);
signal(SIGTERM, SIG_IGN);
setintr = 0; /* No interrupts after "logout" */
if (adrof("home"))
signal(SIGTERM, SIG_IGN);
setintr = 0; /* No interrupts after "logout" */
if (adrof("home"))
bool wantnl;
{
register char **v;
bool wantnl;
{
register char **v;
+ sigsetmask(omask & ~sigmask(SIGINT));
if (pjobs) {
pjobs = 0;
printf("\n");
if (pjobs) {
pjobs = 0;
printf("\n");
bferr("Interrupted");
}
}
bferr("Interrupted");
}
}
- if (setintr)
- sighold(SIGINT);
- sigrelse(SIGCHLD);
+ sigsetmask(omask & ~sigmask(SIGCHLD));
* Interruptible during interactive reads
*/
if (setintr)
* Interruptible during interactive reads
*/
if (setintr)
+ sigsetmask(sigblock(0) & ~sigmask(SIGINT));
/*
* For the sake of reset()
/*
* For the sake of reset()
* The parser may lose space if interrupted.
*/
if (setintr)
* The parser may lose space if interrupted.
*/
if (setintr)
+ sigblock(sigmask(SIGINT));
/*
* Save input text on the history list if
/*
* Save input text on the history list if
-/* csh.h 4.10 83/07/01 */
+/* csh.h 4.11 84/08/31 */
#include "sh.local.h"
#include <sys/time.h>
#include "sh.local.h"
#include <sys/time.h>
#define eq(a, b) (strcmp(a, b) == 0)
#define eq(a, b) (strcmp(a, b) == 0)
-/*
- * For 4.2bsd signals.
- */
-#define mask(s) (1 << ((s)-1))
-#define sigsys(s, a) signal(s, a)
-#define sighold(s) sigblock(mask(s))
-
-static char *sccsid = "@(#)exec.c 4.8 %G%";
+static char *sccsid = "@(#)exec.c 4.9 %G%";
#include "sh.h"
#include <sys/dir.h>
#include "sh.h"
#include <sys/dir.h>
-static char *sccsid = "@(#)file.c 1.2 (Berkeley from Hp Labs) %G%";
+static char *sccsid = "@(#)file.c 1.3 (Berkeley from Hp Labs) %G%";
/*
* Tenex style file name recognition, .. and more.
/*
* Tenex style file name recognition, .. and more.
#include <signal.h>
#include <pwd.h>
#include <signal.h>
#include <pwd.h>
-/*
- * For 4.2bsd signals.
- *
- * (can't include sh.h)
- */
-#define mask(s) (1 << ((s)-1))
-#define sigsys(s, a) signal(s, a)
-#define sighold(s) sigblock(mask(s))
-
extern short SHIN, SHOUT;
#define TRUE 1
extern short SHIN, SHOUT;
#define TRUE 1
+ int omask;
+
+ omask = sigblock(sigmask(SIGINT));
if (on)
{
struct sgttyb sgtty;
if (on)
{
struct sgttyb sgtty;
tchars.t_brkc = -1;
ioctl (SHIN, TIOCSETC, &tchars);
}
tchars.t_brkc = -1;
ioctl (SHIN, TIOCSETC, &tchars);
}
back_to_col_1 ()
{
struct sgttyb tty, tty_normal;
back_to_col_1 ()
{
struct sgttyb tty, tty_normal;
+ int omask;
+
+ omask = sigblock (sigmask(SIGINT));
ioctl (SHIN, TIOCGETP, &tty);
tty_normal = tty;
tty.sg_flags &= ~CRMOD;
ioctl (SHIN, TIOCSETN, &tty);
(void) write (SHOUT, "\r", 1);
ioctl (SHIN, TIOCSETN, &tty_normal);
ioctl (SHIN, TIOCGETP, &tty);
tty_normal = tty;
tty.sg_flags &= ~CRMOD;
ioctl (SHIN, TIOCSETN, &tty);
(void) write (SHOUT, "\r", 1);
ioctl (SHIN, TIOCSETN, &tty_normal);
{
register char *p;
struct sgttyb tty, tty_normal;
{
register char *p;
struct sgttyb tty, tty_normal;
+ omask = sigblock (sigmask(SIGINT));
ioctl (SHOUT, TIOCGETP, &tty);
tty_normal = tty;
tty.sg_flags &= ~ECHO;
ioctl (SHOUT, TIOCGETP, &tty);
tty_normal = tty;
tty.sg_flags &= ~ECHO;
for (p = string; *p; p++)
ioctl (SHOUT, TIOCSTI, p);
ioctl (SHOUT, TIOCSETN, &tty_normal);
for (p = string; *p; p++)
ioctl (SHOUT, TIOCSTI, p);
ioctl (SHOUT, TIOCSETN, &tty_normal);
}
#define FREE_ITEMS(items)\
}
#define FREE_ITEMS(items)\
+{ int omask;\
+ omask = sigblock (sigmask(SIGINT));\
free_items (items);\
items = NULL;\
free_items (items);\
items = NULL;\
-static char *sccsid = "@(#)func.c 4.11 84/07/03";
+static char *sccsid = "@(#)func.c 4.12 84/08/31";
#include "sh.h"
#include <sys/ioctl.h>
#include "sh.h"
#include <sys/ioctl.h>
cp = gointr, gointr = 0, xfree(cp);
if (vv == 0) {
if (setintr)
cp = gointr, gointr = 0, xfree(cp);
if (vv == 0) {
if (setintr)
+ sigblock(sigmask(SIGINT));
- sigset(SIGINT, SIG_DFL);
+ signal(SIGINT, SIG_DFL);
gointr = 0;
} else if (eq((vv = strip(vv)), "-")) {
gointr = 0;
} else if (eq((vv = strip(vv)), "-")) {
- sigset(SIGINT, SIG_IGN);
+ signal(SIGINT, SIG_IGN);
gointr = "-";
} else {
gointr = savestr(vv);
gointr = "-";
} else {
gointr = savestr(vv);
whyles->w_end = -1;
if (setintr)
whyles->w_end = -1;
if (setintr)
+ sigsetmask(sigblock(0) & ~sigmask(SIGINT));
search(ZBREAK, 0);
if (setintr)
search(ZBREAK, 0);
if (setintr)
+ sigblock(sigmask(SIGINT));
whyles->w_end = btell();
}
whyles->w_end = btell();
}
char **v;
struct command *kp;
{
char **v;
struct command *kp;
{
i = getn(v[1]);
if (setintr)
i = getn(v[1]);
if (setintr)
+ omask = sigblock(sigmask(SIGINT)) & ~sigmask(SIGINT);
lshift(v, 2);
while (i > 0) {
if (setintr)
lshift(v, 2);
while (i > 0) {
if (setintr)
reexecute(kp);
--i;
}
donefds();
if (setintr)
reexecute(kp);
--i;
}
donefds();
if (setintr)
int nonl = 0;
if (setintr)
int nonl = 0;
if (setintr)
+ sigsetmask(sigblock(0) & ~sigmask(SIGINT));
v++;
if (*v == 0)
return;
v++;
if (*v == 0)
return;
else
flush();
if (setintr)
else
flush();
if (setintr)
+ sigblock(sigmask(SIGINT));
if (gargv)
blkfree(gargv), gargv = 0;
}
if (gargv)
blkfree(gargv), gargv = 0;
}
- int (*old)(), ldisc;
- int ctpgrp;
+ int ldisc, ctpgrp;
+ int (*old)();
if (loginsh)
error("Can't suspend a login shell (yet)");
untty();
if (loginsh)
error("Can't suspend a login shell (yet)");
untty();
- old = sigsys(SIGTSTP, SIG_DFL);
+ old = signal(SIGTSTP, SIG_DFL);
kill(0, SIGTSTP);
/* the shell stops here */
kill(0, SIGTSTP);
/* the shell stops here */
if (tpgrp != -1) {
retry:
ioctl(FSHTTY, TIOCGPGRP, &ctpgrp);
if (ctpgrp != opgrp) {
if (tpgrp != -1) {
retry:
ioctl(FSHTTY, TIOCGPGRP, &ctpgrp);
if (ctpgrp != opgrp) {
- old = sigsys(SIGTTIN, SIG_DFL);
+ old = signal(SIGTTIN, SIG_DFL);
goto retry;
}
ioctl(FSHTTY, TIOCSPGRP, &shpgrp);
goto retry;
}
ioctl(FSHTTY, TIOCSPGRP, &shpgrp);
-static char *sccsid = "@(#)glob.c 4.5 %G%";
+static char *sccsid = "@(#)glob.c 4.6 %G%";
#include "sh.h"
#include <sys/dir.h>
#include "sh.h"
#include <sys/dir.h>
return (scc == 0);
default:
return (scc == 0);
default:
error(err);
if (t)
t->t_dflg |= FPAR;
error(err);
if (t)
t->t_dflg |= FPAR;
- sigignore(SIGTSTP);
- sigignore(SIGTTIN);
- sigignore(SIGTTOU);
+ signal(SIGTSTP, SIG_IGN);
+ signal(SIGTTIN, SIG_IGN);
+ signal(SIGTTOU, SIG_IGN);
execute(t, -1);
exitstat();
}
execute(t, -1);
exitstat();
}
-static char *sccsid = "@(#)hist.c 4.6 %G%";
+static char *sccsid = "@(#)hist.c 4.7 %G%";
if (getn(value("history")) == 0)
return;
if (setintr)
if (getn(value("history")) == 0)
return;
if (setintr)
+ sigsetmask(sigblock(0) & ~sigmask(SIGINT));
vp++;
while (*vp && *vp[0] == '-') {
if (*vp && eq(*vp, "-h")) {
vp++;
while (*vp && *vp[0] == '-') {
if (*vp && eq(*vp, "-h")) {
-static char *sccsid = "@(#)misc.c 4.2 %G%";
+static char *sccsid = "@(#)misc.c 4.3 %G%";
-cfree(p)
- char *p;
-{
-
- free(p);
-}
-
char **
blkend(up)
register char **up;
char **
blkend(up)
register char **up;
-static char *sccsid = "@(#)proc.c 4.12 (Berkeley) 83/07/01";
+static char *sccsid = "@(#)proc.c 4.13 (Berkeley) 84/08/31";
#include "sh.h"
#include "sh.dir.h"
#include "sh.h"
#include "sh.dir.h"
pnote()
{
register struct process *pp;
pnote()
{
register struct process *pp;
neednote = 0;
for (pp = proclist.p_next; pp != PNULL; pp = pp->p_next) {
if (pp->p_flags & PNEEDNOTE) {
neednote = 0;
for (pp = proclist.p_next; pp != PNULL; pp = pp->p_next) {
if (pp->p_flags & PNEEDNOTE) {
+ omask = sigblock(sigmask(SIGCHLD));
pp->p_flags &= ~PNEEDNOTE;
flags = pprint(pp, NUMBER|NAME|REASON);
if ((flags&(PRUNNING|PSTOPPED)) == 0)
pflush(pp);
pp->p_flags &= ~PNEEDNOTE;
flags = pprint(pp, NUMBER|NAME|REASON);
if ((flags&(PRUNNING|PSTOPPED)) == 0)
pflush(pp);
pwait()
{
register struct process *fp, *pp;
pwait()
{
register struct process *fp, *pp;
/*
* Here's where dead procs get flushed.
*/
/*
* Here's where dead procs get flushed.
*/
+ omask = sigblock(sigmask(SIGCHLD));
for (pp = (fp = &proclist)->p_next; pp != PNULL; pp = (fp = pp)->p_next)
if (pp->p_pid == 0) {
fp->p_next = pp->p_next;
for (pp = (fp = &proclist)->p_next; pp != PNULL; pp = (fp = pp)->p_next)
if (pp->p_pid == 0) {
fp->p_next = pp->p_next;
xfree((char *)pp);
pp = fp;
}
xfree((char *)pp);
pp = fp;
}
- sigrelse(SIGCHLD);
- if (setintr)
- sigignore(SIGINT);
register struct process *pp;
{
register struct process *fp;
register struct process *pp;
{
register struct process *fp;
+ int jobflags, reason, omask;
+ int (*old)();
+
+ if (setintr)
+ old = signal(SIGINT, SIG_IGN);
while (pp->p_pid != pp->p_jobid)
pp = pp->p_friends;
while (pp->p_pid != pp->p_jobid)
pp = pp->p_friends;
* and the target process, or any of its friends, are running
*/
fp = pp;
* and the target process, or any of its friends, are running
*/
fp = pp;
+ omask = sigblock(sigmask(SIGCHLD));
jobflags = 0;
do
jobflags |= fp->p_flags;
jobflags = 0;
do
jobflags |= fp->p_flags;
- while((fp = (fp->p_friends)) != pp);
+ while ((fp = (fp->p_friends)) != pp);
if ((jobflags & PRUNNING) == 0)
break;
if ((jobflags & PRUNNING) == 0)
break;
- sigpause(sigblock(0) &~ mask(SIGCHLD));
if (tpgrp > 0)
ioctl(FSHTTY, TIOCSPGRP, &tpgrp); /* get tty back */
if ((jobflags&(PSIGNALED|PSTOPPED|PTIME)) ||
if (tpgrp > 0)
ioctl(FSHTTY, TIOCSPGRP, &tpgrp); /* get tty back */
if ((jobflags&(PSIGNALED|PSTOPPED|PTIME)) ||
if (reason && exiterr)
exitstat();
pflush(pp);
if (reason && exiterr)
exitstat();
pflush(pp);
+ if (setintr)
+ signal(SIGINT, old);
dowait()
{
register struct process *pp;
dowait()
{
register struct process *pp;
- if (setintr)
- sigrelse(SIGINT);
+ omask = sigblock(sigmask(SIGCHLD));
for (pp = proclist.p_next; pp; pp = pp->p_next)
if (pp->p_pid && /* pp->p_pid == pp->p_jobid && */
pp->p_flags&PRUNNING) {
for (pp = proclist.p_next; pp; pp = pp->p_next)
if (pp->p_pid && /* pp->p_pid == pp->p_jobid && */
pp->p_flags&PRUNNING) {
- sigpause(sigblock(0) &~ mask(SIGCHLD));
do {
pp = pfind(*v);
pstart(pp, 1);
do {
pp = pfind(*v);
pstart(pp, 1);
- if (setintr)
- sigignore(SIGINT);
pjwait(pp);
} while (*v && *++v);
}
pjwait(pp);
} while (*v && *++v);
}
okpcntl();
pp = pfind(v[0]);
pstart(pp, 1);
okpcntl();
pp = pfind(v[0]);
pstart(pp, 1);
- if (setintr)
- sigignore(SIGINT);
{
register struct process *pp, *np;
register int jobflags = 0;
{
register struct process *pp, *np;
register int jobflags = 0;
+ int omask, pid, err = 0;
char *cp;
extern char *sys_errlist[];
char *cp;
extern char *sys_errlist[];
+ omask = sigmask(SIGCHLD);
- sighold(SIGINT);
- sighold(SIGCHLD);
+ omask |= sigmask(SIGINT);
+ omask = sigblock(omask) & ~omask;
while (*v) {
cp = globone(*v);
if (*cp == '%') {
while (*v) {
cp = globone(*v);
if (*cp == '%') {
- sigrelse(SIGCHLD);
- if (setintr)
- sigrelse(SIGINT);
int foregnd;
{
register struct process *np;
int foregnd;
{
register struct process *np;
+ int omask, jobflags = 0;
+ omask = sigblock(sigmask(SIGCHLD));
np = pp;
do {
jobflags |= np->p_flags;
np = pp;
do {
jobflags |= np->p_flags;
ioctl(FSHTTY, TIOCSPGRP, &pp->p_jobid);
if (jobflags&PSTOPPED)
killpg(pp->p_jobid, SIGCONT);
ioctl(FSHTTY, TIOCSPGRP, &pp->p_jobid);
if (jobflags&PSTOPPED)
killpg(pp->p_jobid, SIGCONT);
{
register int pid;
bool ignint = 0;
{
register int pid;
bool ignint = 0;
/*
* A child will be uninterruptible only under very special
/*
* A child will be uninterruptible only under very special
/*
* Hold SIGCHLD until we have the process installed in our table.
*/
/*
* Hold SIGCHLD until we have the process installed in our table.
*/
+ omask = sigblock(sigmask(SIGCHLD));
while ((pid = fork()) < 0)
if (setintr == 0)
sleep(FORKSLEEP);
else {
while ((pid = fork()) < 0)
if (setintr == 0)
sleep(FORKSLEEP);
else {
- sigrelse(SIGINT);
- sigrelse(SIGCHLD);
error("No more processes");
}
if (pid == 0) {
error("No more processes");
}
if (pid == 0) {
child++;
if (setintr) {
setintr = 0; /* until I think otherwise */
child++;
if (setintr) {
setintr = 0; /* until I think otherwise */
/*
* Children just get blown away on SIGINT, SIGQUIT
* unless "onintr -" seen.
/*
* Children just get blown away on SIGINT, SIGQUIT
* unless "onintr -" seen.
*/
if (t->t_dflg & FNOHUP)
signal(SIGHUP, SIG_IGN);
*/
if (t->t_dflg & FNOHUP)
signal(SIGHUP, SIG_IGN);
- if (t->t_dflg & FNICE) {
-/* sigh...
- nice(20);
- nice(-10);
-*/
- nice(t->t_nice);
- }
-
+ if (t->t_dflg & FNICE)
+ setpriority(PRIO_PROCESS, 0, t->t_nice);
-static char *sccsid = "@(#)sem.c 4.3 %G%";
+static char *sccsid = "@(#)sem.c 4.4 %G%";
#include "sh.h"
#include "sh.proc.h"
#include "sh.h"
#include "sh.proc.h"
int vffree();
int ochild, osetintr, ohaderr, odidfds, odidcch;
int oSHIN, oSHOUT, oSHDIAG, oOLDSTD, otpgrp;
int vffree();
int ochild, osetintr, ohaderr, odidfds, odidcch;
int oSHIN, oSHOUT, oSHDIAG, oOLDSTD, otpgrp;
+ omask = sigblock(sigmask(SIGCHLD));
ochild = child; osetintr = setintr;
ohaderr = haderr; odidfds = didfds; odidcch = didcch;
oSHIN = SHIN; oSHOUT = SHOUT;
ochild = child; osetintr = setintr;
ohaderr = haderr; odidfds = didfds; odidcch = didcch;
oSHIN = SHIN; oSHOUT = SHOUT;
Vsav = Vdp = 0; Vav = 0;
pid = vfork();
if (pid < 0) {
Vsav = Vdp = 0; Vav = 0;
pid = vfork();
if (pid < 0) {
error("No more processes");
}
forked++;
error("No more processes");
}
forked++;
xfree(Vav); Vav = 0;
/* this is from pfork() */
palloc(pid, t);
xfree(Vav); Vav = 0;
/* this is from pfork() */
palloc(pid, t);
} else {
/* this is from pfork() */
int pgrp;
} else {
/* this is from pfork() */
int pgrp;
if (setintr) {
setintr = 0;
#ifdef notdef
if (setintr) {
setintr = 0;
#ifdef notdef
- sigsys(SIGCHLD, SIG_DFL);
+ signal(SIGCHLD, SIG_DFL);
- sigsys(SIGINT,
- ignint ? SIG_IGN : vffree);
- sigsys(SIGQUIT,
- ignint ? SIG_IGN : SIG_DFL);
+ signal(SIGINT, ignint ?
+ SIG_IGN : vffree);
+ signal(SIGQUIT, ignint ?
+ SIG_IGN : SIG_DFL);
- sigsys(SIGTSTP, SIG_DFL);
- sigsys(SIGTTIN, SIG_DFL);
- sigsys(SIGTTOU, SIG_DFL);
+ signal(SIGTSTP, SIG_DFL);
+ signal(SIGTTIN, SIG_DFL);
+ signal(SIGTTOU, SIG_DFL);
- sigsys(SIGTERM, parterm);
+ signal(SIGTERM, parterm);
} else if (tpgrp == -1 && (t->t_dflg&FINT)) {
} else if (tpgrp == -1 && (t->t_dflg&FINT)) {
- sigsys(SIGINT, SIG_IGN);
- sigsys(SIGQUIT, SIG_IGN);
+ signal(SIGINT, SIG_IGN);
+ signal(SIGQUIT, SIG_IGN);
}
if (wanttty > 0)
ioctl(FSHTTY, TIOCSPGRP, &pgrp);
}
if (wanttty > 0)
ioctl(FSHTTY, TIOCSPGRP, &pgrp);
if (tpgrp > 0)
tpgrp = 0;
if (t->t_dflg & FNOHUP)
if (tpgrp > 0)
tpgrp = 0;
if (t->t_dflg & FNOHUP)
- sigsys(SIGHUP, SIG_IGN);
+ signal(SIGHUP, SIG_IGN);
+ setpriority(PRIO_PROCESS, 0, t->t_nice);
#endif
if (pid != 0) {
/*
#endif
if (pid != 0) {
/*
-static char *sccsid = "@(#)set.c 4.2 %G%";
+static char *sccsid = "@(#)set.c 4.3 %G%";
extern char end[];
if (cp >= end && cp < (char *) &cp)
extern char end[];
if (cp >= end && cp < (char *) &cp)