Reputation: 11
I have one C++ program that runs another program in a separate process, which does extensive calculations.
How can I know if this other process crashed because of an "out of memory" error?
I use QProcess
and QLocalSocket
.
Upvotes: 0
Views: 597
Reputation: 2479
You cannot get the reason for the crash of a running process executed by QProcess. You can only be informed that it finished (normally or crashed) or that an error occured during execution.
All that can be handled by processing QProcess signals
void QProcess::errorOccurred(QProcess::ProcessError error)
void QProcess::finished(int exitCode, QProcess::ExitStatus exitStatus = NormalExit)
Please, refer to the official documentation.
Upvotes: 1