]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
FreeBSD: Finish EVFILT_PROCDESC implementation.
authorRoy Marples <roy@marples.name>
Thu, 18 Mar 2021 12:14:54 +0000 (12:14 +0000)
committerRoy Marples <roy@marples.name>
Thu, 18 Mar 2021 12:14:54 +0000 (12:14 +0000)
src/eloop.c

index bf85a5d567fc845f712b7e4894dc83797f37151a..c4354961d21d84e3fb7ddabed953618c5e1f2371 100644 (file)
@@ -993,6 +993,14 @@ eloop_run_kqueue(struct eloop *eloop, const struct timespec *ts)
                        events = ELE_READ;
                else if (ke->filter == EVFILT_WRITE)
                        events = ELE_WRITE;
+#ifdef EVFILT_PROCDESC
+               else if (ke->filter == EVFILT_PROCDESC &&
+                   ke->fflags & NOTE_EXIT)
+                       /* exit status is in ke->data.
+                        * As we default to using ppoll anyway
+                        * we don't have to do anything with it right now. */
+                       events = ELE_HANGUP;
+#endif
                else
                        continue; /* assert? */
                if (ke->flags & EV_EOF)