From 01aace706a434baaf0a4145f67f13c8a78a130c8 Mon Sep 17 00:00:00 2001 From: John Ericson <John.Ericson@Obsidian.Systems> Date: Sun, 23 Mar 2025 18:00:36 -0400 Subject: [PATCH] `monitor-fd.hh`: Format It's a pretty small diff, so let's just start formatting before we make other changes. (cherry picked from commit 041394b741ade095210a396d6a3ab3218d86e1c1) --- maintainers/flake-module.nix | 1 - src/libutil/unix/monitor-fd.hh | 11 +++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/maintainers/flake-module.nix b/maintainers/flake-module.nix index bdc0d49a9..6e20ef71d 100644 --- a/maintainers/flake-module.nix +++ b/maintainers/flake-module.nix @@ -369,7 +369,6 @@ ''^src/libutil/types\.hh$'' ''^src/libutil/unix/file-descriptor\.cc$'' ''^src/libutil/unix/file-path\.cc$'' - ''^src/libutil/unix/monitor-fd\.hh$'' ''^src/libutil/unix/processes\.cc$'' ''^src/libutil/unix/signals-impl\.hh$'' ''^src/libutil/unix/signals\.cc$'' diff --git a/src/libutil/unix/monitor-fd.hh b/src/libutil/unix/monitor-fd.hh index b6610feff..cfbf10d5a 100644 --- a/src/libutil/unix/monitor-fd.hh +++ b/src/libutil/unix/monitor-fd.hh @@ -14,7 +14,6 @@ namespace nix { - class MonitorFdHup { private: @@ -33,11 +32,11 @@ public: anymore. So wait for read events and ignore them. */ fds[0].events = - #ifdef __APPLE__ +#ifdef __APPLE__ POLLRDNORM - #else +#else 0 - #endif +#endif ; auto count = poll(fds, 1, -1); if (count == -1) @@ -50,7 +49,8 @@ public: coordination with the main thread if spinning proves too harmful. */ - if (count == 0) continue; + if (count == 0) + continue; if (fds[0].revents & POLLHUP) { unix::triggerInterrupt(); break; @@ -70,5 +70,4 @@ public: } }; - }