$Id$
Copyright © 2009 Mandriva
Revision History | ||
---|---|---|
Revision 1.2.4 | 2009-08-28 | NR |
Nothing new | ||
Revision 1.2.3 | 2009-07-22 | NR |
First version. |
Abstract
The error codes used when deploying a package with Pulse 2.
Table of Contents
Starting with version 1.2.3, error codes ranges have been rationalized to reduce the risk of collision between error codes used by scripts and error codes used by Pulse 2 for internal purposes.
Let's take an example: a script "foobar" runs a single command on targets;
in case of success, the returned value is 0,
in case of failure, the returned value is 137.
pre-1.2.3, Pulse 2 was also using the error code 137 to know when a script has been terminated using SIGTERM, for example when running out of time.
In our example, if Pulse 2 was given 137 as error code, it could not know if it was because of the script failure, or because the script was killed.
Additionally, pre-1.2.3, the error code range used by the Pulse 2 check-client feature was not established.
Use 0 for success.
Use any of 1-199 for failure.
Do not use 200-255.
For "historical reason", error code 0 has to be used only to represent a success. Do not use it to represent a failure !
Script succeeded
Range 1 to 199 is freely usable by script authors to represent a failure that occurred within the script. Do not use them to represent a success !
Script failed, return error code can be freely used by the script author.
Range 200 to 231 is internally used to represent that script ended upon signal reception. Do not use them !
Script was killed by a signal higher than 31 (SIGSYS), most probably a RT signal.
Script was killed by signal 1 (SIGHUP).
Script was killed by signal 2 (SIGINT).
Script was killed by signal 3 (SIGQUIT).
Script was killed by signal 4 (SIGILL).
Script was killed by signal 5 (SIGTRAP).
Script was killed by signal 6 (SIGABRT).
Script was killed by signal 8 (SIGFPE).
Script was killed by signal 9 (SIGKILL).
Script was killed by signal 11 (SIGSEGV).
Script was killed by signal 12 (SIGHUP).
Script was killed by signal 13 (SIGPIPE).
Script was killed by signal 14 (SIGALRM).
Script was killed by signal 15 (SIGTERM).
Script was killed by signal <error-code> minus 200 .
Range 240 to 254 indicates a pre-check error.
Something weird append while pre-checking.
Pre-check failed.
Reserved for future use.