]> git.ipfire.org Git - thirdparty/lxc.git/commit
lxcapi_restore shouldn't steal the calling process
authorTycho Andersen <tycho.andersen@canonical.com>
Fri, 20 Mar 2015 16:17:31 +0000 (10:17 -0600)
committerStéphane Graber <stgraber@ubuntu.com>
Mon, 6 Apr 2015 16:48:48 +0000 (12:48 -0400)
commitc9d8f2ee720b4fe1b3642be90dfe9418d2232de5
treeb8a81f28ca17d06ac10e2e464b872392ff13210c
parent428b68dbeb593c03e2a1145c4cce3e070ec6a7c3
lxcapi_restore shouldn't steal the calling process

Previously, lxcapi_restore used the calling process as the lxc monitor process
(and just never returned), requiring users to fork before calling it. This, of
course, would cause problems for things like LXD, which can't fork.

Now, restore() forks the monitor as a child of the process that calls it. Users
who want to daemonize the restore process need to fork themselves.
lxc-checkpoint has been updated to reflect this behavior change.

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
src/lxc/lxc_checkpoint.c
src/lxc/lxccontainer.c