diff options
author | Helge Deller <deller@gmx.de> | 2023-07-08 07:24:00 +0200 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2023-07-08 16:55:08 +0200 |
commit | dca4c8384d68bbf5d67f50a5446865d92d61f032 (patch) | |
tree | 29d66509307794e68cd71f96e41c471d88faa023 /ui/input-keymap.c | |
parent | e0ddf8eac9f83c0bc5a3d39605d873ee0fe53421 (diff) |
linux-user: Fix accept4(SOCK_NONBLOCK) syscall
The Linux accept4() syscall allows two flags only: SOCK_NONBLOCK and
SOCK_CLOEXEC, and returns -EINVAL if any other bits have been set.
Change the qemu implementation accordingly, which means we can not use
the fcntl_flags_tbl[] translation table which allows too many other
values.
Beside the correction in behaviour, this actually fixes the accept4()
emulation for hppa, mips and alpha targets for which SOCK_NONBLOCK is
different than TARGET_SOCK_NONBLOCK (aka O_NONBLOCK).
The fix can be verified with the testcase of the debian lwt package,
which hangs forever in a read() syscall without this patch.
Signed-off-by: Helge Deller <deller@gmx.de>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'ui/input-keymap.c')
0 files changed, 0 insertions, 0 deletions