diff options
author | Christian Hopps <chopps@labn.net> | 2020-04-24 04:39:59 -0400 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2020-09-03 22:50:13 +0000 |
commit | 1da08197eb4e3eba9e795ee14bcac8417506378b (patch) | |
tree | 45d5a1ed09e0f9f07dbda9140461e8ebe7e9c4ee /src | |
parent | 0c936b147f4fc52bdb685f701bc7d93959a1a6a2 (diff) |
vlib: exit 0 (nocore) on SIGHUP
Scenarios where SIGHUP is sent would include the user closing an xterm
while in interactive/nodaemon mode, or similarly when running vpp in the
same mode during testing (e.g., using ssh to run VPP on a DUT). VPP
should exit in these cases; however, generating a core is unwanted.
Type: fix
Signed-off-by: Christian Hopps <chopps@labn.net>
Change-Id: Ibccfe5e676547e913c8a205ff16ab56d9abb1c82
Diffstat (limited to 'src')
-rw-r--r-- | src/vlib/unix/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vlib/unix/main.c b/src/vlib/unix/main.c index 568876b2933..95aeecf2da2 100644 --- a/src/vlib/unix/main.c +++ b/src/vlib/unix/main.c @@ -180,8 +180,8 @@ unix_signal_handler (int signum, siginfo_t * si, ucontext_t * uc) /* have to remove SIGABRT to avoid recursive - os_exit calling abort() */ unsetup_signal_handlers (SIGABRT); - /* os_exit(1) causes core generation, do not do this for SIGINT */ - if (signum == SIGINT) + /* os_exit(1) causes core generation, skip that for SIGINT, SIGHUP */ + if (signum == SIGINT || signum == SIGHUP) os_exit (0); else os_exit (1); |