Skip to content

Commit 6902cb7

Browse files
authored
server : stop gracefully on SIGTERM (#6348)
1 parent d2d8f38 commit 6902cb7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

examples/server/server.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3566,6 +3566,7 @@ int main(int argc, char ** argv) {
35663566
sigemptyset (&sigint_action.sa_mask);
35673567
sigint_action.sa_flags = 0;
35683568
sigaction(SIGINT, &sigint_action, NULL);
3569+
sigaction(SIGTERM, &sigint_action, NULL);
35693570
#elif defined (_WIN32)
35703571
auto console_ctrl_handler = +[](DWORD ctrl_type) -> BOOL {
35713572
return (ctrl_type == CTRL_C_EVENT) ? (signal_handler(SIGINT), true) : false;

0 commit comments

Comments
 (0)