]> git.ipfire.org Git - thirdparty/lxc.git/commit
console: exit mainloop on SIGTERM
authorChristian Brauner <christian.brauner@ubuntu.com>
Sun, 12 Nov 2017 16:51:11 +0000 (17:51 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Mon, 13 Nov 2017 16:18:37 +0000 (17:18 +0100)
commit94b9b79499271a496447805b135482e7bae946fc
tree28d8691de990f20d95ffc4b9914fe9a71c99a5de
parent8de44ef8ea7636cea93fa542297bd1e3ad4020b0
console: exit mainloop on SIGTERM

This allows cleanly exiting a console session without control sequences.

Relates to https://github.com/lxc/lxd/pull/4001 .

Note that the existence of a signal handler now doesn't guarantee that ts->node
is allocated. Instead, ts->node will now only be added to if stdinfd is a tty.
New checks need to take that into account.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/console.c