1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 10:41:16 +02:00

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 041394b741)
This commit is contained in:
John Ericson 2025-03-23 18:00:36 -04:00 committed by Mergify
parent b369ccf1d7
commit a04bc3ed7a
2 changed files with 5 additions and 7 deletions

View file

@ -368,7 +368,6 @@
''^src/libutil/types\.hh$'' ''^src/libutil/types\.hh$''
''^src/libutil/unix/file-descriptor\.cc$'' ''^src/libutil/unix/file-descriptor\.cc$''
''^src/libutil/unix/file-path\.cc$'' ''^src/libutil/unix/file-path\.cc$''
''^src/libutil/unix/monitor-fd\.hh$''
''^src/libutil/unix/processes\.cc$'' ''^src/libutil/unix/processes\.cc$''
''^src/libutil/unix/signals-impl\.hh$'' ''^src/libutil/unix/signals-impl\.hh$''
''^src/libutil/unix/signals\.cc$'' ''^src/libutil/unix/signals\.cc$''

View file

@ -14,7 +14,6 @@
namespace nix { namespace nix {
class MonitorFdHup class MonitorFdHup
{ {
private: private:
@ -33,11 +32,11 @@ public:
anymore. So wait for read events and ignore anymore. So wait for read events and ignore
them. */ them. */
fds[0].events = fds[0].events =
#ifdef __APPLE__ #ifdef __APPLE__
POLLRDNORM POLLRDNORM
#else #else
0 0
#endif #endif
; ;
auto count = poll(fds, 1, -1); auto count = poll(fds, 1, -1);
if (count == -1) if (count == -1)
@ -50,7 +49,8 @@ public:
coordination with the main thread if spinning proves coordination with the main thread if spinning proves
too harmful. too harmful.
*/ */
if (count == 0) continue; if (count == 0)
continue;
if (fds[0].revents & POLLHUP) { if (fds[0].revents & POLLHUP) {
unix::triggerInterrupt(); unix::triggerInterrupt();
break; break;
@ -70,5 +70,4 @@ public:
} }
}; };
} }