Fix stdin/stdout after vzctl enter
vzctl enter sets O_NONBLOCK for stdin and stdout and
forgets to restore original flags. This leads to following:
HW# vzctl enter 104 --exec exit; read a
entered into Container 104
CT104# exit
logout
exited from Container 104
bash: read: read error: 0: Resource temporarily unavailable
Fix this by saving and then restoring stdin/stdout fd flags.
http://bugzilla.openvz.org/1956
http://bugs.debian.org/638072
Reported-by: Daniel Alder <daniel-alder@gmx.net>
Reported-by: Ola Lundqvist <ola@inguza.com>
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
1 file changed