summaryrefslogtreecommitdiff
path: root/samples/bpf/cookie_uid_helper_example.c
diff options
context:
space:
mode:
Diffstat (limited to 'samples/bpf/cookie_uid_helper_example.c')
-rw-r--r--samples/bpf/cookie_uid_helper_example.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/samples/bpf/cookie_uid_helper_example.c b/samples/bpf/cookie_uid_helper_example.c
index b08ab4e88929..9d751e209f31 100644
--- a/samples/bpf/cookie_uid_helper_example.c
+++ b/samples/bpf/cookie_uid_helper_example.c
@@ -306,7 +306,9 @@ int main(int argc, char *argv[])
prog_attach_iptables(argv[2]);
if (cfg_test_traffic) {
if (signal(SIGINT, finish) == SIG_ERR)
- error(1, errno, "register handler failed");
+ error(1, errno, "register SIGINT handler failed");
+ if (signal(SIGTERM, finish) == SIG_ERR)
+ error(1, errno, "register SIGTERM handler failed");
while (!test_finish) {
print_table();
printf("\n");