[Lxc-users] lxc-unshare woes and signal forwarding in lxc-start

Ferenc Wagner wferi at niif.hu
Thu May 6 10:31:28 UTC 2010


Daniel Lezcano <daniel.lezcano at free.fr> writes:

> Ferenc Wagner wrote:
>
>> I'd like to use lxc-start as a wrapper, invisible to the parent and
>> the (jailed) child.  Of course I could hack around this by not
>> exec-ing lxc-start but keeping the shell around, trap all signals and
>> lxc-killing them forward.  But it's kind of ugly in my opinion.
>
> Ok, got it. I think that makes sense to forward the signals,
> especially for job management.  What signals do you want to forward?

Basically all of them.  I couldn't find a definitive list of signals
used for job control in SGE, but the following is probably a good
approximation: SIGTTOU, SIGTTIN, SIGUSR1, SIGUSR2, SIGCONT, SIGWINCH and
SIGTSTP.  This is application specific, though, lxc-start shouldn't have
this hard-coded.  Looking at the source, the SIGCHLD mechanism could be
mimicked, but LXC_TTY_ADD_HANDLER may get in the way.  I'm also worried
about signals sent to the whole process group: they may be impossible to
distinguish from the targeted signals and thus can't propagate correctly.
-- 
Thanks,
Feri.




More information about the lxc-users mailing list