]> git.proxmox.com Git - mirror_lxc.git/commit
serialize multiple threads doing lxcapi_start()
authorDwight Engen <dwight.engen@oracle.com>
Mon, 13 May 2013 16:03:14 +0000 (12:03 -0400)
committerSerge Hallyn <serge.hallyn@ubuntu.com>
Mon, 13 May 2013 17:21:51 +0000 (12:21 -0500)
commit714540763b8b1ac12c029d7760b4e4fe13a69b43
tree8b75bd8b3a377257bd3c9b1a62ec122b899a3103
parent304143a823ede4eca52f1d11ae1449995ad503ff
serialize multiple threads doing lxcapi_start()

The problem is that the fd table is shared between threads and if a thread
forks() while another thread has an open fd to the monitor, the duped fd
in the fork()ed child will not get closed, thus causing monitord to stay
around since it thinks it still has a client. This only happened when
calling lxcapi_start() in the daemonized case since that is the only time
we try to get the status from the monitor.

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
src/lxc/lxccontainer.c