]> git.ipfire.org Git - thirdparty/lxc.git/commit
terminal: make a terminal FDs non-blocking
authorAlexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
Fri, 21 Apr 2023 16:38:53 +0000 (18:38 +0200)
committerStéphane Graber <stgraber@stgraber.org>
Tue, 25 Jul 2023 16:28:29 +0000 (12:28 -0400)
commitfba0ae071778526399eb457fe1bfa3f411288da1
tree18351e529f7260346c0f1ca5063fc69827e13848
parent1af412d2f9700de4bf25c1dc1c694286379406fb
terminal: make a terminal FDs non-blocking

Let's prevent freezes on read(2) by making a terminal FDs non-blocking.

It was discovered that there is an issue with io_uring mainloop when
multishot poll (IORING_POLL_ADD_MULTI) mode is enabled. Sometimes
false-positive poll events are put into a CQ. It makes further read(2)
stuck forever and blocks all mainloop processing for an infinite time.

Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>
src/lxc/terminal.c