I have a Qt application (non-GUI) running. I want to know the state in which my application exited so I can either restart it or mark it as completed successfully. Think of it as a simple shell script that wants to know this.
I'm using QCoreApplication::exit(errorCode) to exit the application but I'm not sure how and where to read this value.
QCoreApplication::exit(errorCode)exits the event loop with a return value oferrorCode.returns
errorCodefrom the applicationIf you are using bash as a shell you can find the exit code of the last application in $?