开发者

QProcess::finished ( int exitCode, QProcess::ExitStatus exitStatus ) :possible values of exitcode?

I am using QProcess to execute shell commands.

开发者_运维百科How can I determine that command is executed successfully ?

ExitStatus tells that process exited normally or crashed.

What are the possible values of exitcode ? I am getting variant exitcode for different process.


Any exit code which fits into int is possible.

By convention, an exit code of 0 means "success" and anything else means "failure". This works for all operating systems I know, and there are additional conventions to give more details about errors in some cases. There is an overview at http://en.wikipedia.org/wiki/Exit_status

In practice you will find that almost all programs with a Unix heritage will correctly follow the convention of 0 for success, but some Windows programs will not. Due to the design differences between the two OS, exit codes tend to be used less correctly on Windows than on Unix.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜