[PATCH] runit.c: add sys/select.h include
runit.c seems to rely on a transitive dependency between sys/types.h and sys/select.h that exists on some systems such as Linux. When we tried porting runit to managarm we ran into an issue related to it, where fd_set and timeval weren't declared at time of use in runit.c. Consulting the Open Group's POSIX specification, it shows that sys/types.h does not need to specify either of the two, and that they are in sys/select.h. This patch corrects the include. --- src/runit.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/runit.c b/src/runit.c index 48620b3..976495b 100644 --- a/src/runit.c +++ b/src/runit.c @@ -2,6 +2,7 @@ #include #include #include +#include #include #include #include -- 2.24.1
Re: Readiness notification exemplars
It's maybe a little heavy-handed, but is there any technical reason not to just pick an arbitrary FD, like say 3, and just always use that for a particular daemon? For a given daemon, no, there's no reason not to pick an arbitrary fd and stick to it. That's the intended usage. For a supervisor, the flexibility is a good thing, because daemons may already be using arbitrary fds so it's better not to hardcode anything. -- Laurent