-
- Downloads
ntdll/server: Make robust to spurious short writes
It is possible for the write/writev functions in send_request to
return short writes, even in non-error conditions. There are
several situations where this might happen. Examples are:
- SIGSTOP/SIGCONT (either explicitly or via ptrace attach)
- cgroup freezes and similar mechanisms
- system suspends
- External debuggers or profilers
In general, Linux makes very few guarantees about syscall restarts.
In some cases (in particular when no bytes have been transferred at all),
the linux kernel will automatically restart the system call, but once any
bytes have been transferred, the result will be a short write with
no automatic restart.
Make wine robust to this corner case by properly restarting a
short write with adjusted buffers.
Signed-off-by:
Keno Fischer <keno@juliacomputing.com>
Please register or sign in to comment