mirror of
https://github.com/xdp-project/bpf-examples.git
synced 2024-05-06 15:54:53 +00:00
pping: Add graceful shutdown on SIGTERM
Also intercept SIGTERM (in addition the the previously intercepted SIGINT) and perform graceful shutdown. Perhaps it also makes sense to perform graceful shutdown on some additional signals, like SIGHUP and SIGQUIT? Signed-off-by: Simon Sundberg <simon.sundberg@kau.se>
This commit is contained in:
@ -1024,6 +1024,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
// Allow program to perform cleanup on Ctrl-C
|
||||
signal(SIGINT, abort_program);
|
||||
signal(SIGTERM, abort_program);
|
||||
|
||||
// Main loop
|
||||
while (keep_running) {
|
||||
|
Reference in New Issue
Block a user