[Libvir] [PATCH] lxc: handle SIGCHLD from exiting container

Dave Leskovec dlesko at linux.vnet.ibm.com
Thu May 1 06:38:01 UTC 2008


This patch allows the lxc driver to handle SIGCHLD signals from exiting
containers.  The handling will perform some cleanup such as waiting for
the container process and killing/waiting the tty process.  This is also
required as a first step towards providing some kind of client container exit
notification.  Additional support is needed for that but this SIGCHLD handling
is what would trigger the notification.

libvirtd was already catching SIGCHLD although it was just ignoring it.  I
implemented a mechanism to distribute the signal to any other drivers in the
daemon that registered a function to handle them.  This required some changes to
the way libvirtd was catching signals (to get the pid of the sending process) as
well as an addition to the state driver structure.  The intent was to provide
future drivers access to signals as well.

-- 
Best Regards,
Dave Leskovec
IBM Linux Technology Center
Open Virtualization

-------------- next part --------------
A non-text attachment was scrubbed...
Name: lxc_sigchld.patch
Type: text/x-patch
Size: 10558 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20080430/ae648bc0/attachment-0001.bin>


More information about the libvir-list mailing list