Detaching from process
-
@Massimiliano75
It's not "annoying", it's indirectly warning you that your code is not good....Your
QProcess process
variable means that it goes out of scope once you exit the method. And since you have onlystart()
ed the process but not waited for it finish, this is bad....Your
QProcess
instance should stay in scope until theQProcess::finished
signal or similar is received. -
the function was a quickly written example what happens to me is
QProcess genericProcessIstance;
genericProcessIstance.start("script -i eth0"));
genericProcessIstance.waitForStarted(10000);
genericProcessIstance.waitForFinished(10000);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
-
@Massimiliano75
If the code is written right (I assume you have verified that command finishes correctly within the10000
?), I have never seen such a message from Ubuntu, nor Windows. Having said that, I would never usewaitForFinished()
, only slots, I don't know if that is relevant to the message issuance.Check whether it has anything to do with
script
command, e.g. try just anls
? Linuxscript
is doing some "funny" stuff. Or, maybe it's your Qt version? -
@Massimiliano75
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. -
-
@Massimiliano75
@Bonnie has a good point! Searching woboq forDetaching from process
does not show any occurrence in Qt source code, so perhaps you're just talking about a gdb setting/message. -
@Massimiliano75
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 runningscript
and to try, say,ls
instead.... -
@JonB
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