Use default signalfd in echoserver

This commit is contained in:
Laurence Withers 2007-11-07 21:33:47 +00:00
parent 397939b4d5
commit 36dc25a350
1 changed files with 1 additions and 2 deletions

View File

@ -128,12 +128,10 @@ int main(int argc, char* argv[])
return 1; return 1;
} }
#if 0
if(!lwevent_signalfd_default()) { if(!lwevent_signalfd_default()) {
perror("lwevent_signalfd_default"); perror("lwevent_signalfd_default");
return 1; return 1;
} }
#endif
/* get hostname and socket, and bind it */ /* get hostname and socket, and bind it */
ret = getaddrinfo(argv[1], argv[2], 0, &saddr); ret = getaddrinfo(argv[1], argv[2], 0, &saddr);
@ -176,6 +174,7 @@ int main(int argc, char* argv[])
/* main event loop */ /* main event loop */
ret = lwevent_loop(); ret = lwevent_loop();
if(ret) perror("lwevent_loop"); if(ret) perror("lwevent_loop");
else fputs("Shutting down cleanly.\n", stdout);
return ret; return ret;
} }