There are multiple reasons why this is not required:
- every command is transactional
- we only care about the list being modified not the memory allocation and
other costly operations
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
return state;
}
- process_lock();
ret = lxc_cmd(name, &cmd, &stopped, lxcpath, NULL);
- process_unlock();
if (ret < 0) {
ERROR("%s - Failed to execute command", strerror(errno));
return -1;
#include "commands_utils.h"
#include "initutils.h"
#include "log.h"
+#include "lxclock.h"
#include "monitor.h"
#include "state.h"
#include "utils.h"
return -ENOMEM;
}
+ process_lock();
lxc_list_add_elem(tmplist, newclient);
lxc_list_add_tail(&handler->state_clients, tmplist);
+ process_unlock();
TRACE("added state client %d to state client list", state_client_fd);