QProcess doesn't start application when using LaunchDaemon on macOS
-
wrote on 12 Jun 2017, 13:00 last edited by TheLaw 6 Dec 2017, 13:01
Hello, I'm have trouble understanding why a QProcess doesn't start an executable when the application in which the qprocess runs is a LaunchDaemon on macOS. So I have a LaunchDaemon process which launches at boot and in that daemon a QProcess is called to start an application executable at something like /Applications/application_name/Contents/MacOS/application_name using setProgram() and start(), but that doesn't work on boot. If I just manually stop the daemon it relaunches itself because of "<key>KeepAlive</key><true/>" in its .plist file and then all of a sudden the qprocess does launch the application correctly. Any ideas why that happens and how I can fix it?
-
wrote on 12 Jun 2017, 13:35 last edited by m.sue 6 Dec 2017, 13:39
Hi,
are you sure that you or better the user that runs your application can at all start something at that specific point of time during boot? Did you e.g. check it with simple non-gui- or gui-system routines as replacement?
-Michael.
1/2