63 |
return 0; |
return 0; |
64 |
} |
} |
65 |
|
|
|
RETSIGTYPE |
|
|
(*install_signal_flags(signo, func, flags))(int) |
|
|
int signo; |
|
|
void (*func)(int); |
|
|
int flags; |
|
|
{ |
|
|
struct sigaction act, oact; |
|
|
|
|
|
act.sa_handler = func; |
|
|
sigemptyset(&act.sa_mask); |
|
|
act.sa_flags = flags; |
|
|
#ifdef SA_INTERRUPT /* SunOS */ |
|
|
act.sa_flags |= SA_INTERRUPT; |
|
|
#endif |
|
|
if (sigaction(signo, &act, &oact) < 0) |
|
|
return SIG_ERR; |
|
|
return oact.sa_handler; |
|
|
} |
|
|
|
|
|
RETSIGTYPE |
|
|
(*install_signal(signo, func))(int) |
|
|
int signo; |
|
|
void (*func)(int); |
|
|
{ |
|
|
return install_signal_flags(signo, func, SA_RESTART); |
|
|
} |
|
|
|
|
66 |
#define DEFMAXFD 512 |
#define DEFMAXFD 512 |
67 |
|
|
68 |
/* |
/* |