mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-27 11:52:03 +00:00
lib9: turn certain signals off by default
This commit is contained in:
parent
a58a827f2a
commit
d35c1bb294
1 changed files with 6 additions and 5 deletions
|
@ -37,7 +37,8 @@ struct Sig
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
Restart = 1<<0,
|
Restart = 1<<0,
|
||||||
Ignore = 1<<1
|
Ignore = 1<<1,
|
||||||
|
NoNotify = 1<<2,
|
||||||
};
|
};
|
||||||
|
|
||||||
static Sig sigs[] = {
|
static Sig sigs[] = {
|
||||||
|
@ -58,7 +59,7 @@ static Sig sigs[] = {
|
||||||
SIGPIPE, Ignore,
|
SIGPIPE, Ignore,
|
||||||
SIGALRM, 0,
|
SIGALRM, 0,
|
||||||
SIGTERM, 0,
|
SIGTERM, 0,
|
||||||
SIGTSTP, Restart|Ignore,
|
SIGTSTP, Restart|Ignore|NoNotify,
|
||||||
/* SIGTTIN, Restart|Ignore, */
|
/* SIGTTIN, Restart|Ignore, */
|
||||||
/* SIGTTOU, Restart|Ignore, */
|
/* SIGTTOU, Restart|Ignore, */
|
||||||
SIGXCPU, 0,
|
SIGXCPU, 0,
|
||||||
|
@ -67,10 +68,10 @@ static Sig sigs[] = {
|
||||||
SIGUSR1, 0,
|
SIGUSR1, 0,
|
||||||
SIGUSR2, 0,
|
SIGUSR2, 0,
|
||||||
#ifdef SIGWINCH
|
#ifdef SIGWINCH
|
||||||
SIGWINCH, Restart|Ignore,
|
SIGWINCH, Restart|Ignore|NoNotify,
|
||||||
#endif
|
#endif
|
||||||
#ifdef SIGINFO
|
#ifdef SIGINFO
|
||||||
SIGINFO, Restart|Ignore,
|
SIGINFO, Restart|Ignore|NoNotify,
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -266,7 +267,7 @@ noteinit(void)
|
||||||
*/
|
*/
|
||||||
if(handler(sig->sig) != SIG_DFL)
|
if(handler(sig->sig) != SIG_DFL)
|
||||||
continue;
|
continue;
|
||||||
notifyseton(sig->sig, 1);
|
notifyseton(sig->sig, !(sig->flags&NoNotify));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue