QProcess::startDetached instead of manually fork()-ing
-
Hello,
I'm developing a daemon, however I don't want to usedaemon()
because it causesexit()
to be called in the parent process; I want to continue on and eventually perform some cleanup. Now, I know that I can usefork()
and do the usual magic, butI was wondering whether I could useQProcess::startDetached
instead 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.
Kind regards.EDIT:
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.