]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
negotiate_wrapper: Do not use vfork() (#1697)
authorFrancesco Chemolli <5175948+kinkie@users.noreply.github.com>
Fri, 23 Feb 2024 14:35:53 +0000 (14:35 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Fri, 23 Feb 2024 14:36:03 +0000 (14:36 +0000)
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
src/auth/negotiate/wrapper/required.m4

index b53391c370175e0e9fcae05dfa9ac34d4e286e36..68c428ea5bbe0aa7957d7988babc2d968579677b 100644 (file)
@@ -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);
     }
index 3fbc680121063ca6928bd1db52d2f0532753c492..1fc7464fb76fe4519a075ede6024d4dca0bec186 100755 (executable)
@@ -5,4 +5,4 @@
 ## Please see the COPYING and CONTRIBUTORS files for details.
 ##
 
-AC_CHECK_FUNCS(vfork,[BUILD_HELPER="wrapper"])
+BUILD_HELPER="wrapper"