Don't assume sigset_t and int are equivalent.

This commit is contained in:
jraynard 1998-02-28 10:50:02 +00:00
parent 71f2126865
commit 6ed23116d6
7 changed files with 31 additions and 31 deletions

View File

@ -42,7 +42,7 @@ static const char copyright[] =
static char sccsid[] = "@(#)csh.c 8.2 (Berkeley) 10/12/93";
#else
static const char rcsid[] =
"$Id: csh.c,v 1.11 1997/10/07 16:27:48 eivind Exp $";
"$Id: csh.c,v 1.12 1997/12/10 22:18:21 eivind Exp $";
#endif
#endif /* not lint */
@ -527,7 +527,7 @@ main(argc, argv)
{
int osetintr = setintr;
sig_t oparintr = parintr;
sigset_t omask = sigblock(sigmask(SIGINT));
int omask = sigblock(sigmask(SIGINT));
setintr = 0;
parintr = SIG_IGN; /* Disable onintr */
@ -698,7 +698,7 @@ srcunit(unit, onlyown, hflg)
bool otell = cantell;
struct Bin saveB;
volatile sigset_t omask;
volatile int omask;
jmp_buf oldexit;
/* The (few) real local variables */
@ -934,9 +934,9 @@ pintr1(wantnl)
bool wantnl;
{
Char **v;
sigset_t omask;
int omask;
omask = sigblock((sigset_t) 0);
omask = sigblock(0);
if (setintr) {
(void) sigsetmask(omask & ~sigmask(SIGINT));
if (pjobs) {
@ -1006,7 +1006,7 @@ process(catch)
* Interruptible during interactive reads
*/
if (setintr)
(void) sigsetmask(sigblock((sigset_t) 0) & ~sigmask(SIGINT));
(void) sigsetmask(sigblock(0) & ~sigmask(SIGINT));
/*
* For the sake of reset()

View File

@ -36,7 +36,7 @@
static char sccsid[] = "@(#)exec.c 8.1 (Berkeley) 5/31/93";
#else
static const char rcsid[] =
"$Id: exec.c,v 1.7 1997/08/07 21:42:07 steve Exp $";
"$Id: exec.c,v 1.8 1997/12/10 22:18:22 eivind Exp $";
#endif
#endif /* not lint */
@ -195,7 +195,7 @@ doexec(v, t)
* We must do this AFTER any possible forking (like `foo` in glob) so that
* this shell can still do subprocesses.
*/
(void) sigsetmask((sigset_t) 0);
(void) sigsetmask(0);
/*
* If no path, no words in path, or a / in the filename then restrict the
* command search.

View File

@ -36,7 +36,7 @@
static char sccsid[] = "@(#)func.c 8.1 (Berkeley) 5/31/93";
#else
static const char rcsid[] =
"$Id: func.c,v 1.8 1997/08/07 21:42:09 steve Exp $";
"$Id: func.c,v 1.9 1997/08/08 00:54:03 steve Exp $";
#endif
#endif /* not lint */
@ -510,7 +510,7 @@ preread()
{
whyles->w_end.type = I_SEEK;
if (setintr)
(void) sigsetmask(sigblock((sigset_t) 0) & ~sigmask(SIGINT));
(void) sigsetmask(sigblock(0) & ~sigmask(SIGINT));
search(T_BREAK, 0, NULL); /* read the expression in */
if (setintr)
@ -568,7 +568,7 @@ dorepeat(v, kp)
struct command *kp;
{
int i;
sigset_t omask = 0;
int omask = 0;
i = getn(v[1]);
if (setintr)
@ -910,7 +910,7 @@ xecho(sep, v)
int nonl = 0;
if (setintr)
(void) sigsetmask(sigblock((sigset_t) 0) & ~sigmask(SIGINT));
(void) sigsetmask(sigblock(0) & ~sigmask(SIGINT));
v++;
if (*v == 0)
return;
@ -958,7 +958,7 @@ dosetenv(v, t)
Char **ep;
if (setintr)
(void) sigsetmask(sigblock((sigset_t) 0) & ~sigmask(SIGINT));
(void) sigsetmask(sigblock(0) & ~sigmask(SIGINT));
for (ep = STR_environ; *ep; ep++)
(void) fprintf(cshout, "%s\n", vis_str(*ep));
return;

View File

@ -36,7 +36,7 @@
static char sccsid[] = "@(#)hist.c 8.1 (Berkeley) 5/31/93";
#else
static const char rcsid[] =
"$Id: hist.c,v 1.4 1997/02/22 14:01:59 peter Exp $";
"$Id: hist.c,v 1.5 1997/08/07 21:42:10 steve Exp $";
#endif
#endif /* not lint */
@ -130,7 +130,7 @@ dohist(v, t)
if (getn(value(STRhistory)) == 0)
return;
if (setintr)
(void) sigsetmask(sigblock((sigset_t) 0) & ~sigmask(SIGINT));
(void) sigsetmask(sigblock(0) & ~sigmask(SIGINT));
while (*++v && **v == '-') {
Char *vp = *v;

View File

@ -36,7 +36,7 @@
static char sccsid[] = "@(#)proc.c 8.1 (Berkeley) 5/31/93";
#else
static const char rcsid[] =
"$Id: proc.c,v 1.6 1997/08/08 00:54:05 steve Exp $";
"$Id: proc.c,v 1.7 1997/10/07 16:43:16 eivind Exp $";
#endif
#endif /* not lint */
@ -208,7 +208,7 @@ pnote()
{
struct process *pp;
int flags;
sigset_t omask;
int omask;
neednote = 0;
for (pp = proclist.p_next; pp != NULL; pp = pp->p_next) {
@ -231,7 +231,7 @@ void
pwait()
{
struct process *fp, *pp;
sigset_t omask;
int omask;
/*
* Here's where dead procs get flushed.
@ -262,7 +262,7 @@ pjwait(pp)
{
struct process *fp;
int jobflags, reason;
sigset_t omask;
int omask;
while (pp->p_pid != pp->p_jobid)
pp = pp->p_friends;
@ -351,7 +351,7 @@ dowait(v, t)
struct command *t;
{
struct process *pp;
sigset_t omask;
int omask;
pjobs++;
omask = sigblock(sigmask(SIGCHLD));
@ -359,7 +359,7 @@ dowait(v, t)
for (pp = proclist.p_next; pp; pp = pp->p_next)
if (pp->p_pid && /* pp->p_pid == pp->p_jobid && */
pp->p_flags & PRUNNING) {
(void) sigpause((sigset_t) 0);
(void) sigpause(0);
goto loop;
}
(void) sigsetmask(omask);
@ -1006,7 +1006,7 @@ pkill(v, signum)
struct process *pp, *np;
int jobflags = 0;
int pid, err1 = 0;
sigset_t omask;
int omask;
Char *cp;
omask = sigmask(SIGCHLD);
@ -1090,7 +1090,7 @@ pstart(pp, foregnd)
int foregnd;
{
struct process *np;
sigset_t omask;
int omask;
long jobflags = 0;
omask = sigblock(sigmask(SIGCHLD));
@ -1236,7 +1236,7 @@ pfork(t, wanttty)
int pid;
bool ignint = 0;
int pgrp;
sigset_t omask;
int omask;
/*
* A child will be uninterruptible only under very special conditions.
@ -1333,7 +1333,7 @@ void
pgetty(wanttty, pgrp)
int wanttty, pgrp;
{
sigset_t omask = 0;
int omask = 0;
/*
* christos: I am blocking the tty signals till I've set things

View File

@ -36,7 +36,7 @@
static char sccsid[] = "@(#)sem.c 8.1 (Berkeley) 5/31/93";
#else
static const char rcsid[] =
"$Id: sem.c,v 1.5 1997/02/22 14:02:07 peter Exp $";
"$Id: sem.c,v 1.6 1997/08/07 21:42:15 steve Exp $";
#endif
#endif /* not lint */
@ -73,9 +73,9 @@ execute(t, wanttty, pipein, pipeout)
int pid = 0;
int pv[2];
static sigset_t csigmask;
static int csigmask;
static sigset_t ocsigmask;
static int ocsigmask;
static int onosigchld = 0;
static int nosigchld = 0;
@ -229,7 +229,7 @@ execute(t, wanttty, pipein, pipeout)
else {
int ochild, osetintr, ohaderr, odidfds;
int oSHIN, oSHOUT, oSHERR, oOLDSTD, otpgrp;
sigset_t omask;
int omask;
/*
* Prepare for the vfork by saving everything that the child

View File

@ -36,7 +36,7 @@
static char sccsid[] = "@(#)set.c 8.1 (Berkeley) 5/31/93";
#else
static const char rcsid[] =
"$Id: set.c,v 1.6 1997/02/22 14:02:08 peter Exp $";
"$Id: set.c,v 1.7 1997/08/07 21:42:16 steve Exp $";
#endif
#endif /* not lint */
@ -822,7 +822,7 @@ plist(p)
int len;
if (setintr)
(void) sigsetmask(sigblock((sigset_t) 0) & ~sigmask(SIGINT));
(void) sigsetmask(sigblock(0) & ~sigmask(SIGINT));
for (;;) {
while (p->v_left)