commit d35c1bb294f734a69813ecd305a0906025b7e9fa from: Russ Cox date: Sat Jul 12 14:35:20 2008 UTC lib9: turn certain signals off by default commit - a58a827f2ae0d989102dc4d8c113b9282ef177b3 commit + d35c1bb294f734a69813ecd305a0906025b7e9fa blob - 8480b24662f2a4372ac92d6545965a26afd645ed blob + c322387579f474f53a3d5e9de10c0f421627b37a --- src/lib9/notify.c +++ src/lib9/notify.c @@ -37,7 +37,8 @@ struct Sig enum { Restart = 1<<0, - Ignore = 1<<1 + Ignore = 1<<1, + NoNotify = 1<<2, }; static Sig sigs[] = { @@ -58,7 +59,7 @@ static Sig sigs[] = { SIGPIPE, Ignore, SIGALRM, 0, SIGTERM, 0, - SIGTSTP, Restart|Ignore, + SIGTSTP, Restart|Ignore|NoNotify, /* SIGTTIN, Restart|Ignore, */ /* SIGTTOU, Restart|Ignore, */ SIGXCPU, 0, @@ -67,10 +68,10 @@ static Sig sigs[] = { SIGUSR1, 0, SIGUSR2, 0, #ifdef SIGWINCH - SIGWINCH, Restart|Ignore, + SIGWINCH, Restart|Ignore|NoNotify, #endif #ifdef SIGINFO - SIGINFO, Restart|Ignore, + SIGINFO, Restart|Ignore|NoNotify, #endif }; @@ -266,7 +267,7 @@ noteinit(void) */ if(handler(sig->sig) != SIG_DFL) continue; - notifyseton(sig->sig, 1); + notifyseton(sig->sig, !(sig->flags&NoNotify)); } }