Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Remove configure probe for setsid.
authorThomas Munro <tmunro@postgresql.org>
Thu, 4 Aug 2022 21:21:51 +0000 (09:21 +1200)
committerThomas Munro <tmunro@postgresql.org>
Thu, 4 Aug 2022 21:21:51 +0000 (09:21 +1200)
setsid() is in SUSv2 and all targeted Unix systems have it.  Retain a
HAVE_SETSID macro, defined on Unix only.  That's easier to understand
than !defined(WIN32), for the optional code it governs.

Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Reviewed-by: Andres Freund <andres@anarazel.de>
Discussion: https://postgr.es/m/CA+hUKGJ3LHeP9w5Fgzdr4G8AnEtJ=z=p6hGDEm4qYGEUX5B6fQ@mail.gmail.com

configure
configure.ac
src/include/pg_config.h.in
src/include/port.h
src/tools/msvc/Solution.pm

index 8cbd03fe0addb0ed2080775bca999ba173a0ebd3..232f19a0cd2eb9f0d59033c9c78f9d0e2dd30c4e 100755 (executable)
--- a/configure
+++ b/configure
@@ -16039,7 +16039,7 @@ fi
 LIBS_including_readline="$LIBS"
 LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
 
-for ac_func in backtrace_symbols clock_gettime copyfile fdatasync getifaddrs getpeerucred inet_pton kqueue mbstowcs_l memset_s poll posix_fallocate ppoll pthread_is_threaded_np readlink readv setproctitle setproctitle_fast setsid strchrnul strsignal symlink syncfs sync_file_range uselocale wcstombs_l writev
+for ac_func in backtrace_symbols clock_gettime copyfile fdatasync getifaddrs getpeerucred inet_pton kqueue mbstowcs_l memset_s poll posix_fallocate ppoll pthread_is_threaded_np readlink readv setproctitle setproctitle_fast strchrnul strsignal symlink syncfs sync_file_range uselocale wcstombs_l writev
 do :
   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
index 9ef2a373f28db935da5b5e676fc28c117e091a49..33dffe0ce5506145e025a9dcee6719b8f65902e4 100644 (file)
@@ -1809,7 +1809,6 @@ AC_CHECK_FUNCS(m4_normalize([
    readv
    setproctitle
    setproctitle_fast
-   setsid
    strchrnul
    strsignal
    symlink
index 5015ac6a3ed2cbf2ee1169e81e546a88b7d6eba5..120eacfb200e840dc37608900be890938e76b692 100644 (file)
 /* Define to 1 if you have the `setproctitle_fast' function. */
 #undef HAVE_SETPROCTITLE_FAST
 
-/* Define to 1 if you have the `setsid' function. */
-#undef HAVE_SETSID
-
 /* Define to 1 if the system has the type `socklen_t'. */
 #undef HAVE_SOCKLEN_T
 
index a8598532c016a00faf9129372e0c65fd448a9f4b..7a1a02f6598a403d12f84a1c0d5336ec4db7eeb1 100644 (file)
@@ -525,6 +525,7 @@ extern bool wait_result_is_any_signal(int exit_status, bool include_command_not_
  */
 #ifndef WIN32
 #define HAVE_GETRLIMIT 1
+#define HAVE_SETSID 1
 #define HAVE_SHM_OPEN 1
 #endif
 
index 5499498137c10f4321f843b160cd90ea6144cd3b..a9680dc863010f6ab758978116ec5bf675eb8e1b 100644 (file)
@@ -350,7 +350,6 @@ sub GenerateFiles
        HAVE_SETENV                              => undef,
        HAVE_SETPROCTITLE                        => undef,
        HAVE_SETPROCTITLE_FAST                   => undef,
-       HAVE_SETSID                              => undef,
        HAVE_SOCKLEN_T                           => 1,
        HAVE_SPINLOCKS                           => 1,
        HAVE_STDBOOL_H                           => 1,