]> git.ipfire.org Git - thirdparty/lxc.git/commit
console: ensure that fd is marked EBADF 2171/head
authorChristian Brauner <christian.brauner@ubuntu.com>
Fri, 16 Feb 2018 23:04:30 +0000 (00:04 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Fri, 16 Feb 2018 23:13:10 +0000 (00:13 +0100)
commitc06a0555e9cea7984eb1584c82ba310c2924956f
treed444c6b47ebf2b65495cd152710d091969cd8b32
parent0d0d3655167f9658d0e19f775cfd20cdc52cd906
console: ensure that fd is marked EBADF

If the handler closes the file descriptor for the peer or master fd it is
crucial that we mark it as -EBADF. This will prevent lxc_console_delete()
from calling close() on an already closed file descriptor again. I've
observed the double close in the attach code.

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