]> git.proxmox.com Git - mirror_lxc.git/commit - src/lxc/lxccontainer.c
lxccontainer: add reboot2() API extension
authorChristian Brauner <christian.brauner@ubuntu.com>
Tue, 21 Nov 2017 20:29:57 +0000 (21:29 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Wed, 6 Dec 2017 15:01:22 +0000 (16:01 +0100)
commitd39b10eba1837e3638925e653eb7121d1563cbe3
tree872dc2d32836142b457e4ff98820cf958553d66d
parent24b0bd9a80a1a83b292afa61b1970730d01d4963
lxccontainer: add reboot2() API extension

This adds reboot2() as a new API extension. This function properly wait until a
reboot succeeded. It takes a timeout argument. When set to > 0 reboot2() will
block until the timeout is reached, if timeout is set to zero reboot2() will
not block, if set to -1 reboot2() will block indefinitly.

The struct state_client gets rename to lxc_state_client since it's more in line
with other declarations. It also gets moved from the lxc_handler to the
lxc_conf struct so that the state clients waiting for reboots don't get
deallocated on reboot since the handler is deallocated on reboot.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/commands.c
src/lxc/commands_utils.c
src/lxc/conf.c
src/lxc/conf.h
src/lxc/lxccontainer.c
src/lxc/lxccontainer.h
src/lxc/start.c
src/lxc/start.h
src/lxc/state.c
src/lxc/tools/lxc_stop.c