In seccomp mode, SIGCHLD serves as the child reaper IRQ. So, let's
handle it in the same way as other IRQ signals, including preventing
them from nesting with each other and allowing interrupted syscalls
to be automatically restarted.
Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com>
Link: https://patch.msgid.link/20260106001228.1531146-3-tiwei.btw@antgroup.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
#include <as-layout.h>
#include <kern_util.h>
#include <os.h>
+#include <skas.h>
#include <sysdep/mcontext.h>
#include <um_malloc.h>
#include <sys/ucontext.h>
sigaddset(&action.sa_mask, SIGIO);
sigaddset(&action.sa_mask, SIGWINCH);
sigaddset(&action.sa_mask, SIGALRM);
+ if (using_seccomp)
+ sigaddset(&action.sa_mask, SIGCHLD);
if (sig == SIGSEGV)
flags |= SA_NODEFER;