cd197f85
by Keno Fischer at 2025-04-25T11:03:52+02:00
ntdll: Make server requests 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.
Signed-off-by: Keno Fischer <keno@juliacomputing.com>