diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2006-08-16 10:54:06 +0000 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2006-08-16 10:54:06 +0000 |
commit | a1bc48d15a5d6e78efe744eb7b27b6421cb7222f (patch) | |
tree | a7880f87c2585311975e4087d36255c9f1f0b7ec /sdpd/main.c | |
parent | a23442be507d9384175898a28fb72c35f790fbd1 (diff) |
Convert to using ppoll() and pselect()
Diffstat (limited to 'sdpd/main.c')
-rw-r--r-- | sdpd/main.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sdpd/main.c b/sdpd/main.c index 269d5af8..fbc7f5e6 100644 --- a/sdpd/main.c +++ b/sdpd/main.c @@ -409,6 +409,7 @@ static struct option main_options[] = { int main(int argc, char *argv[]) { + sigset_t sigs; uint16_t mtu = 0; int daemonize = 1, public = 0, master = 0; int opt; @@ -455,6 +456,8 @@ int main(int argc, char *argv[]) signal(SIGQUIT, sig_term); signal(SIGPIPE, SIG_IGN); + sigfillset(&sigs); + for (;;) { int num, nfd; fd_set mask; @@ -462,7 +465,7 @@ int main(int argc, char *argv[]) FD_ZERO(&mask); mask = active_fdset; - num = select(active_maxfd + 1, &mask, NULL, NULL, NULL); + num = pselect(active_maxfd + 1, &mask, NULL, NULL, NULL, &sigs); if (num <= 0) { SDPDBG("Select error:%s", strerror(errno)); goto exit; |