ocaml-multicore / eio

Effects-based direct-style IO for multicore OCaml
Other
540 stars 66 forks source link

eio_posix: ignore some errors writing to the wake up pipe #600

Closed talex5 closed 1 year ago

talex5 commented 1 year ago

The README test failed in CI on macos with:

# File "README.md", line 1, characters 0-0:
# /usr/local/bin/git --no-pager diff --no-index --color=always -u _build/default/README.md _build/default/.mdx/README.md.corrected
# diff --git a/_build/default/README.md b/_build/default/.mdx/README.md.corrected
# index e710380..e1d7eb2 100644
# --- a/_build/default/README.md
# +++ b/_build/default/.mdx/README.md.corrected
# @@ -1673,7 +1673,7 @@ Joining with the other domain
#
#  ```ocaml
#  # y + Domain.join foreign_domain
# -- : int = 42
# +Exception: Unix.Unix_error(Unix.EPIPE, "single_write", "")
#  ```
#
#  we arrive at the answer.

Ignore EPIPE when writing, since it means we've shut down and don't need a wake-up (the event has presumably already been processed).

Also, ignore EAGAIN and EWOULDBLOCK. If the pipe is full, then a wake-up is already pending.