mirror of
https://github.com/hufrea/byedpi.git
synced 2024-12-22 14:25:44 +00:00
Handle SIGTERM
This commit is contained in:
parent
950e85df2c
commit
1d6c0a132e
1
proxy.c
1
proxy.c
@ -974,6 +974,7 @@ int run(struct sockaddr_ina *srv)
|
|||||||
uniperror("signal SIGPIPE!");
|
uniperror("signal SIGPIPE!");
|
||||||
#endif
|
#endif
|
||||||
signal(SIGINT, on_cancel);
|
signal(SIGINT, on_cancel);
|
||||||
|
signal(SIGTERM, on_cancel);
|
||||||
|
|
||||||
int fd = listen_socket(srv);
|
int fd = listen_socket(srv);
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user