4 Return values
The IMYplay program can return any of the following values:
- 0: All actions on the last file succeeded (no errors).
- 1: Only version number, help or licence information was requested and printed, no action.
- -1: Bad/missing command line syntax.
- -2: Unable to initialize the sound library.
- -3: Unable to close the sound library.
- -4: Unable to open the given file.
- -100: A signal was caught and the program was forced to exit.
- 128+N: The program was terminated by signal number N (the signal either wasn’t caught
or was caught after SIGCONT was received).
NOTE: Actually, the negative values are subtracted from 256,
so -1 could turn up as 255, -2 as 254 and so on.
NOTE: The error code is reset after each file. If the last
file was played successfully,
but the previous weren’t, their errors are currently lost.