2
0
mirror of git://github.com/lxc/lxc synced 2025-09-05 12:09:32 +00:00

start: log closing cmd socket and STOPPED state

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
Christian Brauner
2017-12-16 14:39:12 +01:00
parent ac2ba69621
commit c3184275ec

View File

@@ -784,11 +784,6 @@ void lxc_fini(const char *name, struct lxc_handler *handler)
cgroup_destroy(handler);
/* This function will try to connect to the legacy lxc-monitord state
* server and only exists for backwards compatibility.
*/
lxc_monitor_send_state(name, STOPPED, handler->lxcpath);
if (handler->conf->reboot == 0) {
/* For all new state clients simply close the command socket.
* This will inform all state clients that the container is
@@ -798,6 +793,18 @@ void lxc_fini(const char *name, struct lxc_handler *handler)
*/
close(handler->conf->maincmd_fd);
handler->conf->maincmd_fd = -1;
TRACE("Closed command socket");
/* This function will try to connect to the legacy lxc-monitord
* state server and only exists for backwards compatibility.
*/
lxc_monitor_send_state(name, STOPPED, handler->lxcpath);
/* The command socket is closed so no one can acces the command
* socket anymore so there's no need to lock it.
*/
handler->state = STOPPED;
TRACE("Set container state to \"STOPPED\"");
} else {
lxc_set_state(name, handler, STOPPED);
}