From 60fbcad9acbefd0cf9ecd73fbf8ddec54a130877 Mon Sep 17 00:00:00 2001 From: Jameson Nash Date: Fri, 4 Mar 2022 21:38:31 -0500 Subject: [PATCH] process: remove OpenBSD from kevent list (#3506) From user reports, it appears that OpenBSD has a broken kevent NOTE_EXIT implementation. However, we can simply go back to the old, slower version therefore. Fix: https://github.com/libuv/libuv/issues/3504 --- src/unix/process.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/unix/process.c b/src/unix/process.c index b85aa3b9..e634209b 100644 --- a/src/unix/process.c +++ b/src/unix/process.c @@ -63,12 +63,12 @@ extern char **environ; # include "zos-base.h" #endif -#if defined(__APPLE__) || defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) +#if defined(__APPLE__) || defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) #include #endif -#if !(defined(__APPLE__) || defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)) +#if !(defined(__APPLE__) || defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__)) static void uv__chld(uv_signal_t* handle, int signum) { assert(signum == SIGCHLD); uv__wait_children(handle->loop); @@ -964,7 +964,7 @@ int uv_spawn(uv_loop_t* loop, goto error; } -#if !(defined(__APPLE__) || defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)) +#if !(defined(__APPLE__) || defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__)) uv_signal_start(&loop->child_watcher, uv__chld, SIGCHLD); #endif @@ -983,7 +983,7 @@ int uv_spawn(uv_loop_t* loop, * fail to open a stdio handle. This ensures we can eventually reap the child * with waitpid. */ if (exec_errorno == 0) { -#if defined(__APPLE__) || defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) +#if defined(__APPLE__) || defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) struct kevent event; EV_SET(&event, pid, EVFILT_PROC, EV_ADD | EV_ONESHOT, NOTE_EXIT, 0, 0); if (kevent(loop->backend_fd, &event, 1, NULL, 0, NULL)) {