Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QProcess::startDetached instead of manually fork()-ing
I'm developing a daemon, however I don't want to use
daemon()because it causes
exit()to be called in the parent process; I want to continue on and eventually perform some cleanup. Now, I know that I can use
fork()and do the usual magic, but
I was wondering whether I could use
QProcess::startDetachedinstead of that?
Looking at the source it seems that it should work as I want.
Am I correct in assuming that the said static function will detach the child process from the controlling terminal (I think it should but would like a confirmation from someone more experienced than myself)?
Thanks in advance.
I seem to have missed the note in the documentation, which clearly states it will work as I expect, so the question is actually irrelevant.