From: Francesco Chemolli <5175948+kinkie@users.noreply.github.com> Date: Fri, 23 Feb 2024 14:35:53 +0000 (+0000) Subject: negotiate_wrapper: Do not use vfork() (#1697) X-Git-Tag: SQUID_7_0_1~198 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bd05c0b57df13c5376e4ee97abf6c3a228129a00;p=thirdparty%2Fsquid.git 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. --- diff --git a/src/auth/negotiate/wrapper/negotiate_wrapper.cc b/src/auth/negotiate/wrapper/negotiate_wrapper.cc index b53391c370..68c428ea5b 100644 --- a/src/auth/negotiate/wrapper/negotiate_wrapper.cc +++ b/src/auth/negotiate/wrapper/negotiate_wrapper.cc @@ -367,7 +367,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); } @@ -403,7 +403,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"