From: Gerhard Sittig Date: Wed, 25 Jan 2017 20:09:20 +0000 (+0100) Subject: pdtest: Make exit code communicate the termination cause not counts X-Git-Url: https://sigrok.org/gitweb/?a=commitdiff_plain;ds=sidebyside;h=1a5417590cebb5f168079993778b608a131088a3;hp=1a5417590cebb5f168079993778b608a131088a3;p=sigrok-test.git pdtest: Make exit code communicate the termination cause not counts On one hand the exit(3) API might limit the range of values that can get communicated to callers (a single byte is used in some implementations). On the other hand wait(2) might interpret specific meaning into some of the returned values (abnormal cause of termination, like unhandled signals). So the use of error counts as exit codes for processes can be severely constrained. For specific non-zero values of error counts, an exit code of zero might be seen at the caller's side (modulo calculation or truncation). Don't pass error or difference counts to exit(3). Instead communicate the kind of termination (error or difference or success) in exit codes which reliably can get evaluated by callers. ---