aboutsummaryrefslogtreecommitdiff
path: root/src/lib9/notify.c
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2003-12-03 22:50:48 +0000
committerrsc <devnull@localhost>2003-12-03 22:50:48 +0000
commit669250d159e93a6933afa4cd25f410af801515ec (patch)
tree1f053fd518cf1a172863e07050e6e3bf13762f7d /src/lib9/notify.c
parent5a82f26e50fbfbb3090b4cf839decf012637a00e (diff)
downloadplan9port-669250d159e93a6933afa4cd25f410af801515ec.tar.gz
plan9port-669250d159e93a6933afa4cd25f410af801515ec.tar.bz2
plan9port-669250d159e93a6933afa4cd25f410af801515ec.zip
Various fixes.
B - fixed usage, DISPLAY :0 vs :0.0 9term - fixed various terminal things rc - notice traps in Read _p9dir - only run disk code for disks dirread - getdirentries on FreeBSD and Linux are different w.r.t. meaning of off. notify - set up so signals interrupt system calls bprint - use bfmt.
Diffstat (limited to 'src/lib9/notify.c')
-rw-r--r--src/lib9/notify.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/lib9/notify.c b/src/lib9/notify.c
index 7e3c04f7..460eabfe 100644
--- a/src/lib9/notify.c
+++ b/src/lib9/notify.c
@@ -13,7 +13,7 @@ static int sigs[] = {
SIGQUIT,
SIGILL,
SIGTRAP,
- SIGABRT,
+/* SIGABRT, */
#ifdef SIGEMT
SIGEMT,
#endif
@@ -63,16 +63,17 @@ int
notify(void (*f)(void*, char*))
{
int i;
- void (*sf)(int);
+ struct sigaction sa;
+ memset(&sa, 0, sizeof sa);
if(f == nil)
- sf = SIG_DFL;
+ sa.sa_handler = SIG_DFL;
else{
notifyf = f;
- sf = notifysigf;
+ sa.sa_handler = notifysigf;
}
for(i=0; i<nelem(sigs); i++)
- signal(sigs[i], sf);
+ sigaction(sigs[i], &sa, 0);
return 0;
}