]> git.ipfire.org Git - thirdparty/lxc.git/commit
c/r: write status only after trying to parse the pid 1155/head
authorTycho Andersen <tycho.andersen@canonical.com>
Fri, 26 Aug 2016 20:29:45 +0000 (16:29 -0400)
committerTycho Andersen <tycho.andersen@canonical.com>
Fri, 26 Aug 2016 20:29:45 +0000 (16:29 -0400)
commitf3886023c18ce703cb05425d33d8c4e3ca441a3f
tree0df883cdf2dfc1759cd216a7540d2ef84a5fd4bc
parent1f56665557fb75898cb9cbf550063cc8259cf9ad
c/r: write status only after trying to parse the pid

Previously, we write a "success" status but tried to parse the pid. This
meant that we wouldn't notice a successful restore but failure to parse the
pid, which was a little strange.

We still don't know the child pid, so we will end up with a restored
process tree and a running container, but at least in this case the API
will return false indicating that something failed.

We could kill(-1, 9) in this case, but since liblxc runs as root sometimes
(e.g. LXD), that would be a Very Bad Thing.

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
src/lxc/criu.c