Exit codes

When a backend exits, the exit code is examined by qdaemon for information such as whether the job completed successfully and whether the device is still usable.

When a backend exits, the qdaemon looks at its exit code for such information as whether the job was completed successfully and whether the device is still usable. Therefore, it is important that backends use the same convention for their exit codes. The backend should use #include <IN/standard.h> for the values of the codes given here.

The permissible exit codes are:
Item Descriptor
EXITOK No problems encountered.
EXITBAD The parameters could not be acted upon. Two common examples are a flag's not being valid or a file that could not be opened. The qdaemon sets the state of the device (displayed by qchk) to OFF, sends a message to the console, and does not run any further jobs on that device until someone has explicitly set its state to ON again (with an enq -Pqueuename -U command).
EXITERROR The backend could not finish printing the job. The qdaemon restarts the same job from the beginning on the same device. The qdaemon enforces a limit on the number of times the job will be restarted.
EXITFATAL The job could not be finished because of a problem in the device that requires manual intervention. The qdaemon sets the state of the device (displayed by qchk) to OFF, sends a message to the console, and does not run any further jobs on that device until someone has explicitly set its state to ON again (with an enq -Pqueuename -U command).
EXITSIGNAL The backend was interrupted by a SIGTERM signal (#include <signal.h>).
EXITWARN The backend has issued a warning to the qdaemon. The job may or may not be completed successfully, but in either case, when the qdaemon receives an EXITWARN from the backend, qdaemon returns a message explaining the problem.