From b655ed5ed0c6d58a7e8937c28a7b2a0ccdf9c97e Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 10 Jun 2015 23:18:42 +0200 Subject: 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. --- input/cmd_list.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'input') 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, -- cgit v1.2.3