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
/
func.c
diff --git
a/usr/src/bin/csh/func.c
b/usr/src/bin/csh/func.c
index
7f9f8a6
..
15b16af
100644
(file)
--- a/
usr/src/bin/csh/func.c
+++ b/
usr/src/bin/csh/func.c
@@
-1,4
+1,4
@@
-static char *sccsid = "@(#)func.c 4.
9 83/06/10
";
+static char *sccsid = "@(#)func.c 4.
10 83/06/11
";
#include "sh.h"
#include <sys/ioctl.h>
#include "sh.h"
#include <sys/ioctl.h>
@@
-75,16
+75,16
@@
doonintr(v)
cp = gointr, gointr = 0, xfree(cp);
if (vv == 0) {
if (setintr)
cp = gointr, gointr = 0, xfree(cp);
if (vv == 0) {
if (setintr)
-
(void) sigblock(mask(SIGINT)
);
+
sighold(SIGINT
);
else
else
- sig
nal
(SIGINT, SIG_DFL);
+ sig
set
(SIGINT, SIG_DFL);
gointr = 0;
} else if (eq((vv = strip(vv)), "-")) {
gointr = 0;
} else if (eq((vv = strip(vv)), "-")) {
- sig
nal
(SIGINT, SIG_IGN);
+ sig
set
(SIGINT, SIG_IGN);
gointr = "-";
} else {
gointr = savestr(vv);
gointr = "-";
} else {
gointr = savestr(vv);
- sig
nal
(SIGINT, pintr);
+ sig
set
(SIGINT, pintr);
}
}
}
}
@@
-400,10
+400,10
@@
preread()
whyles->w_end = -1;
if (setintr)
whyles->w_end = -1;
if (setintr)
-
(void) sigrelse(mask(SIGINT)
);
+
sigrelse(SIGINT
);
search(ZBREAK, 0);
if (setintr)
search(ZBREAK, 0);
if (setintr)
- sig
block(mask(SIGINT)
);
+ sig
hold(SIGINT
);
whyles->w_end = btell();
}
whyles->w_end = btell();
}
@@
-453,17
+453,17
@@
dorepeat(v, kp)
i = getn(v[1]);
if (setintr)
i = getn(v[1]);
if (setintr)
-
(void) sigblock(mask(SIGINT)
);
+
sighold(SIGINT
);
lshift(v, 2);
while (i > 0) {
if (setintr)
lshift(v, 2);
while (i > 0) {
if (setintr)
-
(void) sigrelse(mask(SIGINT)
);
+
sigrelse(SIGINT
);
reexecute(kp);
--i;
}
donefds();
if (setintr)
reexecute(kp);
--i;
}
donefds();
if (setintr)
-
(void) sigrelse(mask(SIGINT)
);
+
sigrelse(SIGINT
);
}
doswbrk()
}
doswbrk()
@@
-699,7
+699,7
@@
echo(sep, v)
int nonl = 0;
if (setintr)
int nonl = 0;
if (setintr)
-
(void) sigrelse(mask(SIGINT)
);
+
sigrelse(SIGINT
);
v++;
if (*v == 0)
return;
v++;
if (*v == 0)
return;
@@
-725,7
+725,7
@@
echo(sep, v)
else
flush();
if (setintr)
else
flush();
if (setintr)
-
(void) sigblock(mask(SIGINT)
);
+
sighold(SIGINT
);
if (gargv)
blkfree(gargv), gargv = 0;
}
if (gargv)
blkfree(gargv), gargv = 0;
}
@@
-1008,17
+1008,17
@@
dosuspend()
if (loginsh)
error("Can't suspend a login shell (yet)");
untty();
if (loginsh)
error("Can't suspend a login shell (yet)");
untty();
- old = sig
nal
(SIGTSTP, SIG_DFL);
+ old = sig
sys
(SIGTSTP, SIG_DFL);
kill(0, SIGTSTP);
/* the shell stops here */
kill(0, SIGTSTP);
/* the shell stops here */
- sig
nal
(SIGTSTP, old);
+ sig
sys
(SIGTSTP, old);
if (tpgrp != -1) {
retry:
ioctl(FSHTTY, TIOCGPGRP, &ctpgrp);
if (ctpgrp != opgrp) {
if (tpgrp != -1) {
retry:
ioctl(FSHTTY, TIOCGPGRP, &ctpgrp);
if (ctpgrp != opgrp) {
- old = sig
nal
(SIGTTIN, SIG_DFL);
+ old = sig
sys
(SIGTTIN, SIG_DFL);
kill(0, SIGTTIN);
kill(0, SIGTTIN);
- sig
nal
(SIGTTIN, old);
+ sig
sys
(SIGTTIN, old);
goto retry;
}
ioctl(FSHTTY, TIOCSPGRP, &shpgrp);
goto retry;
}
ioctl(FSHTTY, TIOCSPGRP, &shpgrp);