player: use 4 as process exit code on user quits

So successful playback and user quit can be distinguished, for whatever
reason you may want to do this.

Normally, the "quit" command can be customized, but this does not work
for quit commands sent by the terminal signal handler. One solution
would be introducing something like "ON_SIGNAL" (equivalent to
"CLOSE_WIN"), but considering there are a bunch of possible signals, I'd
rather not get into this. So go with the dumb solution.

Probably fixes #2029.
This commit is contained in:
wm4
2015-06-10 23:18:42 +02:00
parent a3d561f950
commit b655ed5ed0
2 changed files with 2 additions and 1 deletions

View File

@@ -807,6 +807,7 @@ If errors happen, the following exit codes can be returned:
immediately after initialization.
:3: There were some files that could be played, and some files which
couldn't (using the definition of success from above).
:4: The ``quit`` command was issued (default exit code).
Note that quitting the player manually will always lead to exit code 0,
overriding the exit code that would be returned normally. Also, the ``quit``