From 90a723b7cd4f986f1106b0d4a2ce0a5e43a2c93b Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 15 Jan 2024 10:19:31 -0800 Subject: [PATCH] QProcess/Doc: clarify that early crashes happen after started() This is notable when dynamic linking fails, because that happens before the first line of main() (or equivalent) of the child process, so even banners printed by that function may be missing. Change-Id: I5201966b308e48989c06fffd17aa9837156e23f4 Reviewed-by: Ahmad Samir Reviewed-by: Oswald Buddenhagen (cherry picked from commit 458a9d288a14abed6ee0573e6574a9e99f4f7f58) Reviewed-by: Qt Cherry-pick Bot --- src/corelib/io/qprocess.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/corelib/io/qprocess.cpp b/src/corelib/io/qprocess.cpp index 970bd584a29..5f37e47944d 100644 --- a/src/corelib/io/qprocess.cpp +++ b/src/corelib/io/qprocess.cpp @@ -2193,6 +2193,12 @@ QByteArray QProcess::readAllStandardError() printed at the console, and the existing process will continue running unaffected. + \note Success at starting the child process only implies the operating + system has successfully created the process and assigned the resources + every process has, such as its process ID. The child process may crash or + otherwise fail very early and thus not produce its expected output. On most + operating systems, this may include dynamic linking errors. + \sa processId(), started(), waitForStarted(), setNativeArguments() */ void QProcess::start(const QString &program, const QStringList &arguments, OpenMode mode)