lxc/lxc — pull request #325 by yadutaf (2014-09-04 13:38:26+00:00)
Title: Report container exit status to monitord

When managing containers, I need to take action based on container exit status. For instance, if it exited abnormally (status != 0), it may be interesting to respawn it automatically. Or, when invoking `lxc-stop` I want to know if it terminated gracefully (ie on `SIGTERM`) or on `SIGKILL` after a timeout.

This pull request adds a new message type `lxc_msg_exit_code,` to preserve ABI and sends the raw status code as returned by `waitpid` so that listening application may want to apply `WEXITSTATUS` before. This is what `lxc-monitor` does.