crosvm/base
Shintaro Kawamura f35834e243 base: tube: handle EINTR on Tube
According to man 7 signal:

> On Linux, even in the absence of signal handlers, certain blocking
> interfaces can fail with the error EINTR after the process is stopped
> by one  of the stop signals and then resumed via SIGCONT.  This
> behavior is not sanctioned by POSIX.1, and doesn't occur on other
> systems.
>
> The Linux interfaces that display this behavior are:
>
> •  "Input"  socket  interfaces,  when  a  timeout  (SO_RCVTIMEO)  has
>    been set on the socket using setsockopt(2): accept(2), recv(2),
>    recvfrom(2), recvmmsg(2) (also with a non-NULL timeout argument),
>    and recvmsg(2).
> •  "Output" socket interfaces, when a timeout (SO_RCVTIMEO) has been
>    set on the socket using setsockopt(2):  connect(2),  send(2),
>    sendto(2),  and sendmsg(2), if a send timeout (SO_SNDTIMEO) has
>    been set.

The swap feature sends SIGSTOP and SIGCONT to crosvm processes. The
balloon command tube and the proxy devices fall into this category.

BUG=b:259621330
TEST=tools/dev_container tools/run_tests2

Change-Id: I34535430d6fcde4eaf3d2b21acf9ee444baad42c
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4547741
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Shin Kawamura <kawasin@google.com>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
2023-05-23 10:29:53 +00:00
..
base_event_token_derive
src base: tube: handle EINTR on Tube 2023-05-23 10:29:53 +00:00
tests
.build_test_serial
Cargo.toml