Comment 3 for bug 1168526

Revision history for this message
Pavel Bennett (pavben) wrote :

I should add that these "forwarded signal 2" lines are due to me pressing Ctrl+C and are not actually relevant.

Have you been able to repro this bug on kernel 3.8.6?

I'm thinking how to fix this as lxc_spawn is what gets the pid which is needed by lxc_poll to listen for SIGCHLD from the correct pid, but lxc_poll should logically go before lxc_spawn to avoid this race.

How about starting lxc_poll first in a queueing mode, so it just accumulates the signals but doesn't process them yet? When "handler->pid = lxc_clone(do_start, handler, handler->clone_flags);" returns, notify lxc_poll of the pid, thus it should now have all the info it needs, switching it out of queueing mode and initiating a loop to process the queued events now that the pid is known.