From 9f5aec777a27d701e364bb7596ba65e825098eb7 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 25 Aug 2017 10:34:53 -0700 Subject: [PATCH] QProcess: add docs that the PID from startDetached() may be recycled Change-Id: I209fcd5dbc2b4e5381cffffd14de2742eb1d8cd7 Reviewed-by: Joerg Bornemann --- src/corelib/io/qprocess.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/corelib/io/qprocess.cpp b/src/corelib/io/qprocess.cpp index 4e106691f7..1bb3362d5e 100644 --- a/src/corelib/io/qprocess.cpp +++ b/src/corelib/io/qprocess.cpp @@ -2121,8 +2121,12 @@ void QProcess::start(OpenMode mode) \note On QNX, this may cause all application threads to temporarily freeze. - If the function is successful then *\a pid is set to the process - identifier of the started process. + If the function is successful then *\a pid is set to the process identifier + of the started process. Note that the child process may exit and the PID + may become invalid without notice. Furthermore, after the child process + exits, the same PID may be recycled and used by a completely different + process. User code should be careful when using this variable, especially + if one intends to forcibly terminate the process by operating system means. Only the following property setters are supported by startDetached(): \list