libexec/kill-user: suppress syscall deprecation warning on darwin

The existing function is used with good reason as explained by its
comment. This suppresses the warning it creates.

Change-Id: I58b0de3f5854266fa77b6a06b7821a636a6a6964
This commit is contained in:
skye
2026-04-22 08:37:17 -04:00
parent cda9e01053
commit 84347f94da
+3
View File
@@ -36,9 +36,12 @@ int helperMain(const char * name, std::span<char *> args) noexcept
other things, determines if kill(-1, signo) affects the
calling process. In the OSX libc, it's set to true,
which means "follow POSIX", which we don't want here */
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
if (syscall(SYS_kill, -1, SIGKILL, false) == 0) {
break;
}
#pragma clang diagnostic pop
#else
if (kill(-1, SIGKILL) == 0) {
break;