vlib: prevent some signals from being executed on workers 12/40912/3
authorGuillaume Solignac <gsoligna@cisco.com>
Wed, 22 May 2024 08:47:33 +0000 (10:47 +0200)
committerDamjan Marion <dmarion@0xa5.net>
Wed, 22 May 2024 12:52:31 +0000 (12:52 +0000)
commit5444973bd08ff8e9a103fb3436adbdcbb2f666b8
tree80f9670f6d08222339be6cbf4c0bcb10c818fe28
parent71e0902454a2dd51f2ef0526f26ac1c37bf81686
vlib: prevent some signals from being executed on workers

Before this commit, SIGINT, SIGHUP and SIGTERM could be executed on the
workers. Since those signals don't stop execution, it meant that atexit
handlers (like the `vl_unmap_shmem`) could run while the main thread was
still running, which can cause race conditions. To avoid that, we
prevent workers from handling those signals.

Type: fix
Signed-off-by: Guillaume Solignac <gsoligna@cisco.com>
Change-Id: I27a87d96a027d7423ced881a614427af4ab0f969
src/vlib/threads.c