QProcess doesn´t emit finished() when done
-
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.
signal SIGCHLD, which implies that this signal is being used by QProcess to communicate between parent and child processes.
SIGCHLDis precisely how theQProcessknows when the child has exited/terminated, so thatQProcess::finished()can be emitted.