]> git.proxmox.com Git - mirror_lxc.git/commit
Avoid double lxc-freeze/unfreeze
authorRachid Koucha <47061324+Rachid-Koucha@users.noreply.github.com>
Sat, 26 Jan 2019 22:46:34 +0000 (23:46 +0100)
committerGitHub <noreply@github.com>
Sat, 26 Jan 2019 22:46:34 +0000 (23:46 +0100)
commit2341916a0367130d5a084a89884c15c3a835a4b4
treefd8d3e0a3a8fcff5a7473696c0fe2e28519f0c5b
parent5283a1182eec6e7a625026bfdab8ebe4deb10ea2
Avoid double lxc-freeze/unfreeze

If we call lxc-freeze multiple times for an already frozen container, LXC
triggers useless freezing by writing into the "freezer.state" cgroup file.
This is the same when we call lxc-unfreeze multiple times.
Checking the current state with a LXC_CMD_GET_STATE
(calling c->state) would permit to check if the container is FROZEN
or not.

Signed-off-by: Rachid Koucha <rachid.koucha@gmail.com>
src/lxc/lxccontainer.c