This cleans up the API and avoids the need for the caller to wrap each
descriptor in Some() first.
Change-Id: Iaf38a0882f2c9dbc39fb7b910abfa3fedf425f30
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5074591
Reviewed-by: Frederick Mayle <fmayle@google.com>
Reviewed-by: Noah Gold <nkgold@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
On MacOS there is no MSG_NOSIGNAL, but there is SO_NOSIGPIPE which is
set as a socket option. This changes ScmSocket from a trait to a wrapper
type that can guarantee SO_NOSIGPIPE is set once on every relevant
socket before it is used in situations that can produce signals.
The biggest wrinkle is that setsockopt can produce errors, which makes
the conversion into ScmSocket a case that can possibly error. Not all
places that accept sockets were prepared to return errors.
Bug: b/309020556
Change-Id: I079bbaf8803e137ca7c0e0ebe60e63de5df59cc0
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5021438
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Cody Schuffelen <schuffelen@google.com>
This is dead code and can be removed.
Change-Id: Ic6bee7b3a6fe59af117f7667ce4ff2a893cf9228
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5018778
Reviewed-by: Frederick Mayle <fmayle@google.com>
Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
base::Pid is explicitly added since every platform has a process id
type.
Bug: 233233301
Test: tools/dev_container ./tools/presubmit
Change-Id: Id0d54fe06981c1dcbdee3f73b1241af74a26300f
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4909061
Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>
Commit-Queue: Cody Schuffelen <schuffelen@google.com>