QProcess doesn´t emit finished() when done
-
Hi, sry have been sick.
First, no the copy script doesm´t depend on the can bus interface.
And second:
For the can up , i have never tried to get the finished signal. But i tried
canup->wait ForFinished();
Which seems to work cause there is no delay during the can initialisation.
And yes the QProcesses are in different threads, or in different QObjects.@LogiSch17 So what if after you start your process you immediately do
copy->waitForFinished(). Will that ever return? -
@SGaist No even if i wait i have the can0-> waitForFinished(), all the following QProcesses are not returning.
do i have to close something?@ambershark I allready tried but, it stays for the default 30000msecs, but afterwards nothing has been returned.
-
Did you check the content of the standard error and standard output of all your QProcess ? There might be a clue there to what is happening.
-
Can you provide a minimal code sample that triggers that ?
-
i got something like
QStringList arguments; arguments << "can0" << "up"; QProcess::execute("ifconfig", arguments );but i had it allready with finished() and errorOccured() signals conected to slots -> same result.
I would say my buildroot generated OS makes the problem. -
Really surprising. If you call any other command, do you have the same problem ?
-
Is it only on your device or can you reproduce that on your desktop machine ?
-
Since the can bus is a network device, did you try calling
ifconfig upon another device ? That might help narrow down the problem. -
i always start my scripts with:
process->start("/bin/sh", QStringList << "/path/to/my script.sh");when i try to start ls it does not work either.
@LogiSch17 I had a similar problem in that no QProcess::finished() signals were being emitted. The problem was SOLVED by not catching the Unix signal SIGCHLD, which implies that this signal is being used by QProcess to communicate between parent and child processes. Maybe this was your problem too.
-
@LogiSch17 I had a similar problem in that no QProcess::finished() signals were being emitted. The problem was SOLVED by not catching the Unix signal SIGCHLD, which implies that this signal is being used by QProcess to communicate between parent and child processes. Maybe this was your problem too.