From 080cc14493e106c9f90d1e9bbd0d72c3f2d62157 Mon Sep 17 00:00:00 2001 From: Brandon D <59133880+bedwardly-down@users.noreply.github.com> Date: Tue, 10 May 2022 23:06:57 -0500 Subject: [PATCH] fe FreeBSD port: block prctl in leader.cpp --- src/leader.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/leader.cpp b/src/leader.cpp index 4d8d82f..15d6354 100644 --- a/src/leader.cpp +++ b/src/leader.cpp @@ -21,7 +21,9 @@ #include #include #include +#if !defined(__FreeBSD__) #include +#endif #include #include #include @@ -313,12 +315,14 @@ int leader_main(void) { // reap orphaned child processes. Stick with the more fundamental onSignal. kj::UnixEventPort::captureSignal(SIGCHLD); +#if !defined(__FreeBSD__) // Becoming a subreaper means any descendent process whose parent process disappears // will be reparented to this one instead of init (or higher layer subreaper). // We do this so that the run will wait until all descedents exit before executing // the next step. prctl(PR_SET_CHILD_SUBREAPER, 1, NULL, NULL, NULL); - +#endif + // Become the leader of a new process group. This is so that all child processes // will also get a kill signal when the run is aborted setpgid(0, 0);