diff options
| author | Lexi Winter <ivy@FreeBSD.org> | 2025-12-01 03:19:41 +0000 |
|---|---|---|
| committer | Lexi Winter <ivy@FreeBSD.org> | 2025-12-01 03:19:41 +0000 |
| commit | 2e80774d0b20d167bc0a9e2b63dafbfb171c0d22 (patch) | |
| tree | 25f0138e1af8902b92dacc8cce09b267447c17db /databases/foundationdb71-server/files/patch-fdbmonitor_fdbmonitor.cpp | |
| parent | f85f2b2d6e5b7ed869376eb4b180c3a74a5c5da9 (diff) | |
| parent | 1a30da80670973368b399f2b01fe9c04b91a1273 (diff) | |
Merge remote-tracking branch 'freebsd/main' into lf/mainlf/main
Diffstat (limited to 'databases/foundationdb71-server/files/patch-fdbmonitor_fdbmonitor.cpp')
| -rw-r--r-- | databases/foundationdb71-server/files/patch-fdbmonitor_fdbmonitor.cpp | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/databases/foundationdb71-server/files/patch-fdbmonitor_fdbmonitor.cpp b/databases/foundationdb71-server/files/patch-fdbmonitor_fdbmonitor.cpp deleted file mode 100644 index 862461539f53..000000000000 --- a/databases/foundationdb71-server/files/patch-fdbmonitor_fdbmonitor.cpp +++ /dev/null @@ -1,42 +0,0 @@ ---- fdbmonitor/fdbmonitor.cpp.orig 2022-09-19 11:42:41 UTC -+++ fdbmonitor/fdbmonitor.cpp -@@ -27,6 +27,8 @@ - - #ifdef __linux__ - #include <sys/prctl.h> -+#elif defined(__FreeBSD__) -+#include <sys/procctl.h> - #endif - - #include <sys/wait.h> -@@ -751,6 +753,10 @@ void start_process(Command* cmd, ProcessID id, uid_t u - signal(SIGHUP, SIG_DFL); - signal(SIGINT, SIG_DFL); - signal(SIGTERM, SIG_DFL); -+#ifdef __linux__ -+ signal(SIGCHLD, SIG_DFL); -+#endif -+ sigprocmask(SIG_SETMASK, mask, nullptr); - - /* All output in this block should be to stdout (for SevInfo messages) or stderr (for SevError messages) */ - /* Using log_msg() or log_err() from the child will cause the logs to be written incorrectly */ -@@ -780,13 +786,15 @@ void start_process(Command* cmd, ProcessID id, uid_t u - } - - #ifdef __linux__ -- signal(SIGCHLD, SIG_DFL); -- -- sigprocmask(SIG_SETMASK, mask, nullptr); -- - /* death of our parent raises SIGHUP */ - prctl(PR_SET_PDEATHSIG, SIGHUP); - if (getppid() == 1) /* parent already died before prctl */ -+ exit(0); -+#elif defined(__FreeBSD__) -+ /* death of our parent raises SIGHUP */ -+ const int sig = SIGHUP; -+ procctl(P_PID, 0, PROC_PDEATHSIG_CTL, (void*)&sig); -+ if (getppid() == 1) /* parent already died before procctl */ - exit(0); - #endif - |
