Assuming there is a ui involved... All the code we've seen supports a claim that if he just ends the method at this point, nothing will happen as the QProcess object will go out of scope.
That's a really bad idea.4) Use a QTimer to periodically check the state of the child process after it has been started.
Wrong. You can (and in fact have to) initalize the semaphore to 0 and also acquire the semaphore only after the child process is already scheduled by the OS to be started (it does not have to be actually started yet). Then the order of events doesn't matter - the parent will only be able to continue after the child releases the semaphore.I looked at QSystemSemaphore. At the time the main app would try to acquire a resource, the child app will likely not even be running yet. Hence there will be an available resource, the main app will take it, and execution will continue in the main app. As I'm seeing it anyway--how would you do this?
Bookmarks