From 428390a135a689293d31c25da1deced9527a41df Mon Sep 17 00:00:00 2001 From: Francesco Chemolli <5175948+kinkie@users.noreply.github.com> Date: Fri, 23 Feb 2024 14:35:53 +0000 Subject: [PATCH] negotiate_wrapper: Do not use vfork() (#1697) POSIX.1-2001 marks vfork(2) OBSOLETE. POSIX.1-2008 removes the specification of vfork(2). MacOS system headers declare vfork(2) as deprecated. We only use vfork(2) in negotiate_wrapper, where it is not necessary. --- src/auth/negotiate/wrapper/negotiate_wrapper.cc | 4 ++-- src/auth/negotiate/wrapper/required.m4 | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/auth/negotiate/wrapper/negotiate_wrapper.cc b/src/auth/negotiate/wrapper/negotiate_wrapper.cc index 5b39e643fb..4db7adcc06 100644 --- a/src/auth/negotiate/wrapper/negotiate_wrapper.cc +++ b/src/auth/negotiate/wrapper/negotiate_wrapper.cc @@ -354,7 +354,7 @@ main(int argc, char *const argv[]) exit(EXIT_FAILURE); } - if (( fpid = vfork()) < 0 ) { + if (( fpid = fork()) < 0 ) { fprintf(stderr, "%s| %s: Failed first fork\n", LogTime(), PROGRAM); exit(EXIT_FAILURE); } @@ -390,7 +390,7 @@ main(int argc, char *const argv[]) exit(EXIT_FAILURE); } - if (( fpid = vfork()) < 0 ) { + if (( fpid = fork()) < 0 ) { fprintf(stderr, "%s| %s: Failed second fork\n", LogTime(), PROGRAM); exit(EXIT_FAILURE); } diff --git a/src/auth/negotiate/wrapper/required.m4 b/src/auth/negotiate/wrapper/required.m4 index 3fbc680121..1fc7464fb7 100755 --- a/src/auth/negotiate/wrapper/required.m4 +++ b/src/auth/negotiate/wrapper/required.m4 @@ -5,4 +5,4 @@ ## Please see the COPYING and CONTRIBUTORS files for details. ## -AC_CHECK_FUNCS(vfork,[BUILD_HELPER="wrapper"]) +BUILD_HELPER="wrapper" -- 2.47.2