summaryrefslogtreecommitdiffstats
path: root/src/corelib/configure.cmake
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2023-03-16 17:24:15 -0700
committerThiago Macieira <thiago.macieira@intel.com>2023-05-22 10:43:50 -0700
commitf9c87cfd44bcf4b90cb45354252ef19f647b0469 (patch)
tree178c478b703821ead52916e2db562ee819c780c2 /src/corelib/configure.cmake
parent6a4afebc5ce8db69a6c9fb398cada31e6bad5e3c (diff)
QProcess/Unix: add setUnixProcessParameters()
This commit adds those three flags that are either frequent enough or difficult to do: close all file descriptors above stderr and reset the signal handlers. Setting SIGPIPE to be ignored isn't critical, but is required when the ResetSignalHandlers flag is used, as this is run after the user child process modifier. [ChangeLog][QtCore][QProcess] Added setUnixProcessParameters() function that can be used to modify certain settings of the child process, without the need to provide a callback using setChildProcessModifier(). Change-Id: Icfe44ecf285a480fafe4fffd174d0d1d63840403 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/corelib/configure.cmake')
-rw-r--r--src/corelib/configure.cmake17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/corelib/configure.cmake b/src/corelib/configure.cmake
index 8e1b9dc37b..dd89b8ac99 100644
--- a/src/corelib/configure.cmake
+++ b/src/corelib/configure.cmake
@@ -98,6 +98,18 @@ clock_gettime(CLOCK_MONOTONIC, &ts);
}
")
+# close_range
+qt_config_compile_test(close_range
+ LABEL "close_range()"
+ CODE
+"#include <unistd.h>
+
+int main()
+{
+ return close_range(3, 1024, 0) != 0;
+}
+")
+
# cloexec
qt_config_compile_test(cloexec
LABEL "O_CLOEXEC"
@@ -551,6 +563,11 @@ qt_feature("clock-monotonic" PUBLIC
CONDITION QT_FEATURE_clock_gettime AND TEST_clock_monotonic
)
qt_feature_definition("clock-monotonic" "QT_NO_CLOCK_MONOTONIC" NEGATE VALUE "1")
+qt_feature("close_range" PRIVATE
+ LABEL "close_range()"
+ CONDITION QT_FEATURE_process AND TEST_close_range
+ AUTODETECT UNIX
+)
qt_feature("doubleconversion" PRIVATE
LABEL "DoubleConversion"
)