Use default signalfd in echoserver
This commit is contained in:
parent
397939b4d5
commit
36dc25a350
|
@ -128,12 +128,10 @@ int main(int argc, char* argv[])
|
|||
return 1;
|
||||
}
|
||||
|
||||
#if 0
|
||||
if(!lwevent_signalfd_default()) {
|
||||
perror("lwevent_signalfd_default");
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* get hostname and socket, and bind it */
|
||||
ret = getaddrinfo(argv[1], argv[2], 0, &saddr);
|
||||
|
@ -176,6 +174,7 @@ int main(int argc, char* argv[])
|
|||
/* main event loop */
|
||||
ret = lwevent_loop();
|
||||
if(ret) perror("lwevent_loop");
|
||||
else fputs("Shutting down cleanly.\n", stdout);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue