]> git.ipfire.org Git - thirdparty/lxc.git/commit
console: exit mainloop on SIGTERM 1920/head
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 07:32:13 +0000 (08:32 +0100)
commit1349e92e4d23f72cc2969d54b77ade9b11eaddd1
tree07027ac9725cd17159ef4af9a7fb730e8c97c45e
parent0519b5cce799cca7c1b493c27bdaacb1fe589906
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