Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Detaching from process
i have a function with QProcess (qt 5.7.1 linux)
when i do the start of QProcess (only in debug mode)
i have this message in Application output "Detaching from process".
This for any qprocess launched from any Qthread (also the main thread), i have a way to silence this message? is very annoying
It's not "annoying", it's indirectly warning you that your code is not good....
QProcess processvariable means that it goes out of scope once you exit the method. And since you have only
start()ed the process but not waited for it finish, this is bad....
QProcessinstance should stay in scope until the
QProcess::finishedsignal or similar is received.
the function was a quickly written example what happens to me is
genericProcessIstance.start("script -i eth0"));
the message is print immediately after the start,it happens to me for all qprocess even if they live in the main thread for the entire life of the program
JonB last edited by JonB
If the code is written right (I assume you have verified that command finishes correctly within the
10000?), I have never seen such a message from Ubuntu, nor Windows. Having said that, I would never use
waitForFinished(), only slots, I don't know if that is relevant to the message issuance.
Check whether it has anything to do with
scriptcommand, e.g. try just an
scriptis doing some "funny" stuff. Or, maybe it's your Qt version?
@JonB I think it's the version of qt, the previous version was ok, that's why I'm looking for a way to silence it, also because in a while we will go to 5.12
FWIW, I'm on the default Qt 5.12.8 released with Ubuntu 20.04, and I don't see any messages (in debug or release). I don't know whether I ever used 5.7, but I would surely have noticed such a message with whatever versions I used to use.
Bonnie last edited by
@JonB if i check the option
tools-->debugger-> dgb extended--> debug all children , the message disappears
There you are then :) I note that on mine that option is not checked, never has been, and I've never changed anything. And never received the message. I'd be surprised if you want it checked. Then again, I told you it may be to do with running
scriptand to try, say,
Massimiliano75 last edited by Massimiliano75
sorry if i reply now, but my company has closed for a week, launching a script was an example, any qprocess gives me that message also if i start ls, arp-scan or others.
if i start a program locally i don't have this problem, the problem occurs if i start a program in remote debug, but the versions (local and remote) of gdb and linux are the same