* PROBLEM: Namespaced PID 1 ignoring SIG_DFL signals
@ 2015-02-20 21:39 vcaputo
0 siblings, 0 replies; only message in thread
From: vcaputo @ 2015-02-20 21:39 UTC (permalink / raw)
To: linux-kernel; +Cc: vito.caputo
Hello lkml,
According to the comment:
> * Note that if global/container-init sees a sig_kernel_only()
> * signal here, the signal must have been generated internally
> * or must have come from an ancestor namespace. In either
> * case, the signal cannot be dropped.
[https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/kernel/signal.c?id=refs/tags/v3.19#n2290]
Killing a container's PID1 shouldn't be ignored when the default-handled
signal originated from an ancestor namespace or internally.
When executing via `unshare --fork --pid` a trivial "for(;;) pause();" C
program that installs no signal handlers, then sending SIGTERM to the
namespaced process from the parent namespace, the pause() syscall just
returns EINTR and loops rather than the process terminating.
This does not seem consistent with the intention documented in the code.
Additionally, if using a more comprehensive executor than unshare which
allocates a pty for the child and sets the pty slave as the controlling
tty pre-exec, running the same test the signals delivered by the pty
slave are identically ignored. It's unclear to me whether signals
originating from the process' own controlling tty would be classified as
"generated internally".
IMHO both of these scenarios should result in the signal being handled,
but if that's inappropriate I'd appreciate any clarification.
Please CC me with any responses, as I'm not subscribed.
Thanks,
Vito Caputo
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-02-20 21:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-20 21:39 PROBLEM: Namespaced PID 1 ignoring SIG_DFL signals vcaputo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox