From 49588d5d9089589ccda28c41aae90c29d6f72787 Mon Sep 17 00:00:00 2001 From: rsc Date: Wed, 17 Dec 2003 04:34:52 +0000 Subject: Tweaks to various bits. Until I hear otherwise, Refs aren't used enough to merit their own assembly. They are now implemented with locks. --- src/lib9/notify.c | 57 ++++++++++++++++++++++++++++++++----------------------- 1 file changed, 33 insertions(+), 24 deletions(-) (limited to 'src/lib9') diff --git a/src/lib9/notify.c b/src/lib9/notify.c index 160755d0..2e589de7 100644 --- a/src/lib9/notify.c +++ b/src/lib9/notify.c @@ -7,33 +7,37 @@ extern char *_p9sigstr(int, char*); -static int sigs[] = { - SIGHUP, - SIGINT, - SIGQUIT, - SIGILL, - SIGTRAP, +static struct { + int sig; + int restart; +} sigs[] = { + SIGHUP, 0, + SIGINT, 0, + SIGQUIT, 0, + SIGILL, 0, + SIGTRAP, 0, /* SIGABRT, */ #ifdef SIGEMT - SIGEMT, + SIGEMT, 0, #endif - SIGFPE, - SIGBUS, + SIGFPE, 0, + SIGBUS, 0, /* SIGSEGV, */ - SIGSYS, - SIGPIPE, - SIGALRM, - SIGTERM, - SIGTSTP, - SIGTTIN, - SIGTTOU, - SIGXCPU, - SIGXFSZ, - SIGVTALRM, - SIGUSR1, - SIGUSR2, + SIGCHLD, 1, + SIGSYS, 0, + SIGPIPE, 0, + SIGALRM, 0, + SIGTERM, 0, + SIGTSTP, 1, + SIGTTIN, 1, + SIGTTOU, 1, + SIGXCPU, 0, + SIGXFSZ, 0, + SIGVTALRM, 0, + SIGUSR1, 0, + SIGUSR2, 0, #ifdef SIGINFO - SIGINFO, + SIGINFO, 0, #endif }; @@ -72,8 +76,13 @@ notify(void (*f)(void*, char*)) notifyf = f; sa.sa_handler = notifysigf; } - for(i=0; i