[lxc-devel] [PATCH 0/5] Signal stuff v2 and some documentation
Ferenc Wagner
wferi at niif.hu
Thu Jul 15 20:07:11 UTC 2010
Daniel Lezcano <daniel.lezcano at free.fr> writes:
> On 06/09/2010 07:56 PM, Ferenc Wagner wrote:
>
>> here are basically the same patches, with some obvious errors corrected
>> and some unrelated documentation added. It actually survived some
>> targeted testing in the past days and seems to behave as expected, ie.
>>
>> # lxc-start -n s -- sh -c "trap 'echo TERM' TERM; sleep 10"
>>
>> can be interrupted by Ctrl-C from the terminal (the sleep process does
>> not ignore the SIGINT sent to the foreground process group by the OS),
>> while a
>>
>> # pkill lxc-start
>>
>> does not terminate the sleep as the SIGTERM gets forwarded to the shell
>> only, which reports it after the sleep expires. This forwarding
>> mechanism makes it possible to plug lxc into our batch queueing system.
>>
>
> is it your last version or can I investigate with this patchset ?
Yes, this is the version I've been using since I posted it. I haven't
ported it to latest git, but it shouldn't be hard. It seems to do what
I intended, but obviously interferes with the console handling, but that
should be rethought anyway, as I see it. Basically, I feel like the
container console from the user space PoV should be an alias for a
terminal device, just like on a real system. /dev/console isn't
virtualized by the kernel, so it shouldn't be accessible from a
container, although bind mounting it to some tty is an option in case
some program uses it explicitly. In any case, the "console" presented
by lxc-start should always be detachable, preferable even detached by
default.
--
Regards,
Feri.
More information about the lxc-devel
mailing list