Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Fmt.Dump.signal to format signals #543

Merged
merged 1 commit into from
Jun 4, 2023

Conversation

talex5
Copy link
Collaborator

@talex5 talex5 commented Jun 2, 2023

Thanks to @MisterDA for letting me know about this!

@talex5 talex5 added the enhancement New feature or request label Jun 2, 2023
@@ -7,8 +7,8 @@ type status = [ exit_status | `Stopped of int ]

let pp_status ppf = function
| `Exited i -> Format.fprintf ppf "Exited %i" i
| `Signaled i -> Format.fprintf ppf "Signalled %i" i
| `Stopped i -> Format.fprintf ppf "Stopped %i" i
| `Signaled i -> Format.fprintf ppf "Signalled %a" Fmt.Dump.signal i
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it signaled or signalled? :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. I guess the single-L is to match Unix's WIFSIGNALED. I've changed the wording to avoid the problem.

Also, make the message clearer and avoid "signaled" vs "signalled"
confusion.
@talex5 talex5 merged commit dbcbd64 into ocaml-multicore:main Jun 4, 2023
@talex5 talex5 deleted the pp-signal branch June 4, 2023 09:48
talex5 added a commit to talex5/opam-repository that referenced this pull request Jul 12, 2023
CHANGES:

New features / API changes:

- Extend `Eio.Condition` API (@talex5 ocaml-multicore/eio#563).
  - `loop_no_mutex` is a simpler and more efficient way to way for a condition.
  - `register_immediate` allows integration with other IO libraries.

- Expose `Eio.Stdenv.backend_id` (@bord-o ocaml-multicore/eio#560, reviewed by @talex5).
  Useful in tests to report which backend is being used.

- Remove deprecated features (@talex5 ocaml-multicore/eio#552, reviewed by @avsm).
  These were all already marked as deprecated in v0.10 and are now gone completely:
  - `Fiber.fork_sub`
  - `Eio_unix.{FD,Ipaddr,socketpair,getnameinfo}`
  - `Eio_linux.{FD,get_fd,get_fd_opt}`
  - `Eio_posix.Low_level.Fd`

- Allow calling `close` more than once (@talex5 ocaml-multicore/eio#547, requested by @anmonteiro, reviewed by @patricoferris, @avsm).

- Add `close` to socket type (@talex5 ocaml-multicore/eio#549).
  Simplifies the type signatures a bit by avoiding having to mention this everywhere.

Bug fixes:

- Fix handling of empty path strings (@talex5 ocaml-multicore/eio#569, reported by @SGrondin).
  Using "" instead of "." in some places resulted in an error.

- eio_posix: fix update to watched FDs on cancel (@talex5 ocaml-multicore/eio#574, reported and reviewed by @quernd).
  Cancelling the last watcher of an FD didn't remove it from the set passed to `poll`,
  which could result in constant wake-ups.

- eio_posix: fix `pread` at end-of-file (@talex5 ocaml-multicore/eio#581, reported by @SGrondin).
  It tried to return 0 instead of `End_of_file`, triggering an assertion.

- eio_posix: don't reap non-Eio child processes (@talex5 ocaml-multicore/eio#562).
  This allows spawning processes with e.g. the stdlib or Lwt
  (but see ocaml-multicore/lwt_eio#19 for Lwt support).

- Preserve backtraces across `Domain_manager.run` (@talex5 ocaml-multicore/eio#571).
  See ocaml/ocaml#12362.

- Correct the backend selection for Cygwin (@dra27 ocaml-multicore/eio#557).
  Use `eio_posix`, not `eio_windows` in this case.

Other changes:

- Simplify dune files with dune 3.9's `build_if` (@talex5 ocaml-multicore/eio#582).

- Remove `Waiters` from `Eio_core` (@talex5 ocaml-multicore/eio#567).
  `Eio.Switch` no longer uses this so it can finally be removed.

- Use `Fmt.Dump.signal` to format signals (@talex5, @MisterDA ocaml-multicore/eio#543).

Documentation:

- Add some notes about thread-safety in the documentation (@talex5 ocaml-multicore/eio#568).
talex5 added a commit to talex5/opam-repository that referenced this pull request Jul 12, 2023
CHANGES:

New features / API changes:

- Extend `Eio.Condition` API (@talex5 ocaml-multicore/eio#563).
  - `loop_no_mutex` is a simpler and more efficient way to way for a condition.
  - `register_immediate` allows integration with other IO libraries.

- Expose `Eio.Stdenv.backend_id` (@bord-o ocaml-multicore/eio#560, reviewed by @talex5).
  Useful in tests to report which backend is being used.

- Remove deprecated features (@talex5 ocaml-multicore/eio#552, reviewed by @avsm).
  These were all already marked as deprecated in v0.10 and are now gone completely:
  - `Fiber.fork_sub`
  - `Eio_unix.{FD,Ipaddr,socketpair,getnameinfo}`
  - `Eio_linux.{FD,get_fd,get_fd_opt}`
  - `Eio_posix.Low_level.Fd`

- Allow calling `close` more than once (@talex5 ocaml-multicore/eio#547, requested by @anmonteiro, reviewed by @patricoferris, @avsm).

- Add `close` to socket type (@talex5 ocaml-multicore/eio#549).
  Simplifies the type signatures a bit by avoiding having to mention this everywhere.

Bug fixes:

- Fix handling of empty path strings (@talex5 ocaml-multicore/eio#569, reported by @SGrondin).
  Using "" instead of "." in some places resulted in an error.

- eio_posix: fix update to watched FDs on cancel (@talex5 ocaml-multicore/eio#574, reported and reviewed by @quernd).
  Cancelling the last watcher of an FD didn't remove it from the set passed to `poll`,
  which could result in constant wake-ups.

- eio_posix: fix `pread` at end-of-file (@talex5 ocaml-multicore/eio#581, reported by @SGrondin).
  It tried to return 0 instead of `End_of_file`, triggering an assertion.

- eio_posix: don't reap non-Eio child processes (@talex5 ocaml-multicore/eio#562).
  This allows spawning processes with e.g. the stdlib or Lwt
  (but see ocaml-multicore/lwt_eio#19 for Lwt support).

- Preserve backtraces across `Domain_manager.run` (@talex5 ocaml-multicore/eio#571).
  See ocaml/ocaml#12362.

- Correct the backend selection for Cygwin (@dra27 ocaml-multicore/eio#557).
  Use `eio_posix`, not `eio_windows` in this case.

Other changes:

- Simplify dune files with dune 3.9's `build_if` (@talex5 ocaml-multicore/eio#582).

- Remove `Waiters` from `Eio_core` (@talex5 ocaml-multicore/eio#567).
  `Eio.Switch` no longer uses this so it can finally be removed.

- Use `Fmt.Dump.signal` to format signals (@talex5, @MisterDA ocaml-multicore/eio#543).

Documentation:

- Add some notes about thread-safety in the documentation (@talex5 ocaml-multicore/eio#568).
nberth pushed a commit to nberth/opam-repository that referenced this pull request Jun 18, 2024
CHANGES:

New features / API changes:

- Extend `Eio.Condition` API (@talex5 ocaml-multicore/eio#563).
  - `loop_no_mutex` is a simpler and more efficient way to way for a condition.
  - `register_immediate` allows integration with other IO libraries.

- Expose `Eio.Stdenv.backend_id` (@bord-o ocaml-multicore/eio#560, reviewed by @talex5).
  Useful in tests to report which backend is being used.

- Remove deprecated features (@talex5 ocaml-multicore/eio#552, reviewed by @avsm).
  These were all already marked as deprecated in v0.10 and are now gone completely:
  - `Fiber.fork_sub`
  - `Eio_unix.{FD,Ipaddr,socketpair,getnameinfo}`
  - `Eio_linux.{FD,get_fd,get_fd_opt}`
  - `Eio_posix.Low_level.Fd`

- Allow calling `close` more than once (@talex5 ocaml-multicore/eio#547, requested by @anmonteiro, reviewed by @patricoferris, @avsm).

- Add `close` to socket type (@talex5 ocaml-multicore/eio#549).
  Simplifies the type signatures a bit by avoiding having to mention this everywhere.

Bug fixes:

- Fix handling of empty path strings (@talex5 ocaml-multicore/eio#569, reported by @SGrondin).
  Using "" instead of "." in some places resulted in an error.

- eio_posix: fix update to watched FDs on cancel (@talex5 ocaml-multicore/eio#574, reported and reviewed by @quernd).
  Cancelling the last watcher of an FD didn't remove it from the set passed to `poll`,
  which could result in constant wake-ups.

- eio_posix: fix `pread` at end-of-file (@talex5 ocaml-multicore/eio#581, reported by @SGrondin).
  It tried to return 0 instead of `End_of_file`, triggering an assertion.

- eio_posix: don't reap non-Eio child processes (@talex5 ocaml-multicore/eio#562).
  This allows spawning processes with e.g. the stdlib or Lwt
  (but see ocaml-multicore/lwt_eio#19 for Lwt support).

- Preserve backtraces across `Domain_manager.run` (@talex5 ocaml-multicore/eio#571).
  See ocaml/ocaml#12362.

- Correct the backend selection for Cygwin (@dra27 ocaml-multicore/eio#557).
  Use `eio_posix`, not `eio_windows` in this case.

Other changes:

- Simplify dune files with dune 3.9's `build_if` (@talex5 ocaml-multicore/eio#582).

- Remove `Waiters` from `Eio_core` (@talex5 ocaml-multicore/eio#567).
  `Eio.Switch` no longer uses this so it can finally be removed.

- Use `Fmt.Dump.signal` to format signals (@talex5, @MisterDA ocaml-multicore/eio#543).

Documentation:

- Add some notes about thread-safety in the documentation (@talex5 ocaml-multicore/eio#568).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants