start.c: handle potential signal flood

Signalfd does not guarantee that we'll get an event for every signal.
So if 3 tasks exit at the same time, we may get only one sigchld
event.  Therefore, in signal_handler(), always check whether init has
exited.  Do with with WNOWAIT so that we can still wait4 to cleanup
the init after lxc_poll() exists (rather than complicating the code).

Note - there is still a race in the kernel which can cause the
container init to become a defunct child of the host init (!).  This
doesn't solve that, but is a potential (if very unlikely) race which
apw pointed out while we were trying to create a reproducer for the
kernel bug.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
Fix some typos

Signed-off-by: Dmitry Shachnev <mitya57@ubuntu.com>
Reported-by: Vincent Ladeuil
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
fedora: Add missing double-quotes.

Reported-by: tlc
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
avoid zgrep -q as it's failing on some distros

Reported-by: Filirom1
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
fix wrong license text for parts of liblxc library

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
fix license text in ubuntu and ubuntu-cloud templates

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Add a section about licensing to CONTRIBUTING

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
remove old stale comments (lxc-clone is now implemented)

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
lxc-commands: add a comment explaining CMD_* rules

We wish to ensure that, henceforth, newer lxc tools are always compatible
with older lxc monitors.  Add a comment to commands.c to explain the
rule we wish to enforce to this end.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
python: Fix api_test to use the new attach() API

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
lua: update license

As with other files, update to be LGPL since these are part
of the lxc library.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
ubuntu: iproute is now called iproute2

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
licensing: Add missing headers and FSF address

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>