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.
This commit is contained in:
parent
5a82f26e50
commit
669250d159
11 changed files with 124 additions and 63 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue