diff options
author | wm4 <wm4@nowhere> | 2015-06-10 23:18:42 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-06-10 23:18:42 +0200 |
commit | b655ed5ed0c6d58a7e8937c28a7b2a0ccdf9c97e (patch) | |
tree | 688957170f98df217da602d94ca7fc9454277de8 /input/cmd_list.c | |
parent | a3d561f950e74fe7e54fa9c4c6ade05181ecc1ed (diff) | |
download | mpv-b655ed5ed0c6d58a7e8937c28a7b2a0ccdf9c97e.tar.bz2 mpv-b655ed5ed0c6d58a7e8937c28a7b2a0ccdf9c97e.tar.xz |
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.
Diffstat (limited to 'input/cmd_list.c')
-rw-r--r-- | input/cmd_list.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/input/cmd_list.c b/input/cmd_list.c index 5838bff066..ec6b6f936a 100644 --- a/input/cmd_list.c +++ b/input/cmd_list.c @@ -76,7 +76,7 @@ const struct mp_cmd_def mp_cmds[] = { { MP_CMD_REVERT_SEEK, "revert-seek", { OARG_FLAGS(0, ({"mark", 1})), }}, - { MP_CMD_QUIT, "quit", { OARG_INT(0) } }, + { MP_CMD_QUIT, "quit", { OARG_INT(4) } }, { MP_CMD_QUIT_WATCH_LATER, "quit-watch-later", { OARG_INT(0) } }, { MP_CMD_STOP, "stop", }, { MP_CMD_FRAME_STEP, "frame-step", .allow_auto_repeat = true, |