mirror of
https://git.freebsd.org/ports.git
synced 2025-06-11 15:50:33 -04:00
Releases notes at <https://www.schedmd.com/news.php>. Remark: MySQL is no more an option. Security: CVE-2023-49933 through CVE-2023-49938 Differential Revision: <https://reviews.freebsd.org/D42764>
27 lines
700 B
C
27 lines
700 B
C
--- src/scrun/anchor.c.orig 2023-11-21 22:33:29 UTC
|
|
+++ src/scrun/anchor.c
|
|
@@ -43,7 +43,12 @@
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <sys/param.h>
|
|
+#ifdef __FreeBSD__
|
|
+#include <pthread_np.h>
|
|
+#include <sys/signal.h>
|
|
+#else
|
|
#include <sys/prctl.h>
|
|
+#endif
|
|
#include <sys/socket.h>
|
|
#include <sys/stat.h>
|
|
#include <sys/types.h>
|
|
@@ -1034,7 +1039,11 @@ static void _set_proctitle()
|
|
|
|
setproctitle("%s", state.id);
|
|
xstrfmtcat(thread_name, "scrun:%s", state.id);
|
|
+#ifdef __FreeBSD__
|
|
+ if (pthread_setname_np(pthread_self(), thread_name) < 0) {
|
|
+#else
|
|
if (prctl(PR_SET_NAME, thread_name, NULL, NULL, NULL) < 0) {
|
|
+#endif
|
|
fatal("Unable to set process name");
|
|
}
|
|
xfree(thread_name);
|