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
different approach, try signal compatibility package
[unix-history]
/
usr
/
src
/
bin
/
csh
/
csh.c
diff --git
a/usr/src/bin/csh/csh.c
b/usr/src/bin/csh/csh.c
index
660bd36
..
0fc95ac
100644
(file)
--- a/
usr/src/bin/csh/csh.c
+++ b/
usr/src/bin/csh/csh.c
@@
-1,4
+1,4
@@
-static char *sccsid = "@(#)csh.c 4.1
1
%G%";
+static char *sccsid = "@(#)csh.c 4.1
2
%G%";
#include "sh.h"
#include <sys/ioctl.h>
#include "sh.h"
#include <sys/ioctl.h>
@@
-111,7
+111,7
@@
main(c, av)
* We catch it only if we are the login shell.
*/
parintr = signal(SIGINT, SIG_IGN); /* parents interruptibility */
* We catch it only if we are the login shell.
*/
parintr = signal(SIGINT, SIG_IGN); /* parents interruptibility */
- sig
nal
(SIGINT, parintr); /* ... restore */
+ sig
set
(SIGINT, parintr); /* ... restore */
parterm = signal(SIGTERM, SIG_IGN); /* parents terminability */
signal(SIGTERM, parterm); /* ... restore */
if (loginsh) {
parterm = signal(SIGTERM, SIG_IGN); /* parents terminability */
signal(SIGTERM, parterm); /* ... restore */
if (loginsh) {
@@
-258,8
+258,8
@@
main(c, av)
**av = '-';
if (!quitit) /* Wary! */
signal(SIGQUIT, SIG_IGN);
**av = '-';
if (!quitit) /* Wary! */
signal(SIGQUIT, SIG_IGN);
- sig
block(mask(SIGINT)
);
- sig
nal(SIGINT, pintr
);
+ sig
set(SIGINT, pintr
);
+ sig
hold(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);
@@
-283,9
+283,9
@@
retry:
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)() = sig
nal
(SIGTTIN, SIG_DFL);
+ int (*old)() = sig
sys
(SIGTTIN, SIG_DFL);
kill(0, SIGTTIN);
kill(0, SIGTTIN);
- sig
nal
(SIGTTIN, old);
+ sig
sys
(SIGTTIN, old);
goto retry;
}
if (ioctl(f, TIOCGETD, &oldisc) != 0)
goto retry;
}
if (ioctl(f, TIOCGETD, &oldisc) != 0)
@@
-314,7
+314,7
@@
notty:
}
if (setintr == 0 && parintr == SIG_DFL)
setintr++;
}
if (setintr == 0 && parintr == SIG_DFL)
setintr++;
- sig
nal
(SIGCHLD, pchild); /* while signals not ready */
+ sig
set
(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
@@
-488,7
+488,7
@@
srcunit(unit, onlyown, hflg)
getexit(oldexit);
reenter = 0;
if (setintr)
getexit(oldexit);
reenter = 0;
if (setintr)
-
(void) sigblock(mask(SIGINT)
);
+
sighold(SIGINT
);
setexit();
reenter++;
if (reenter == 1) {
setexit();
reenter++;
if (reenter == 1) {
@@
-507,14
+507,14
@@
srcunit(unit, onlyown, hflg)
* we let ourselves be interrupted.
*/
if (setintr)
* we let ourselves be interrupted.
*/
if (setintr)
-
(void) sigrelse(mask(SIGINT)
);
+
sigrelse(SIGINT
);
#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)
-
(void) sigrelse(mask(SIGINT)
);
+
sigrelse(SIGINT
);
if (oSHIN >= 0) {
register int i;
if (oSHIN >= 0) {
register int i;
@@
-578,7
+578,7
@@
goodbye()
{
if (loginsh) {
signal(SIGQUIT, SIG_IGN);
{
if (loginsh) {
signal(SIGQUIT, SIG_IGN);
- sig
nal
(SIGINT, SIG_IGN);
+ sig
set
(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"))
@@
-628,7
+628,7
@@
pintr1(wantnl)
register char **v;
if (setintr) {
register char **v;
if (setintr) {
-
(void) sigrelse(mask(SIGINT)
);
+
sigrelse(SIGINT
);
if (pjobs) {
pjobs = 0;
printf("\n");
if (pjobs) {
pjobs = 0;
printf("\n");
@@
-637,8
+637,8
@@
pintr1(wantnl)
}
}
if (setintr)
}
}
if (setintr)
- sig
block(mask(SIGINT)
);
- sigrelse(
mask(SIGCHLD)
);
+ sig
hold(SIGINT
);
+ sigrelse(
SIGCHLD
);
draino();
/*
draino();
/*
@@
-693,7
+693,7
@@
process(catch)
* Interruptible during interactive reads
*/
if (setintr)
* Interruptible during interactive reads
*/
if (setintr)
-
(void) sigrelse(mask(SIGINT)
);
+
sigrelse(SIGINT
);
/*
* For the sake of reset()
/*
* For the sake of reset()
@@
-771,7
+771,7
@@
process(catch)
* The parser may lose space if interrupted.
*/
if (setintr)
* The parser may lose space if interrupted.
*/
if (setintr)
- sig
block(mask(SIGINT)
);
+ sig
hold(SIGINT
);
/*
* Save input text on the history list if
/*
* Save input text on the history list if