aboutsummaryrefslogtreecommitdiffhomepage
path: root/input
diff options
context:
space:
mode:
authorGravatar wm4 <wm4@nowhere>2014-09-08 01:11:32 +0200
committerGravatar wm4 <wm4@nowhere>2014-09-08 01:11:32 +0200
commit3b5f28bd0f52209f0aeabe4b4a4a0fc60c710e0f (patch)
treebdab69d4c06802a257f2bcd458e94db164e6f9d5 /input
parent8c7a9b0cd0c53a03f4c1e72cacd6e746fb9c589a (diff)
input: fix exiting with signals
Quitting through SIGTERM etc. was accidentally ignored since commit f5af5962 from today.
Diffstat (limited to 'input')
-rw-r--r--input/input.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/input/input.c b/input/input.c
index 328877eeb4..07c7b3f13e 100644
--- a/input/input.c
+++ b/input/input.c
@@ -192,7 +192,6 @@ int async_quit_request;
static int parse_config(struct input_ctx *ictx, bool builtin, bstr data,
const char *location, const char *restrict_section);
static void close_input_sources(struct input_ctx *ictx);
-static bool test_abort(struct input_ctx *ictx);
#define OPT_BASE_STRUCT struct input_opts
struct input_opts {
@@ -1176,9 +1175,10 @@ mp_cmd_t *mp_input_read_cmd(struct input_ctx *ictx)
{
input_lock(ictx);
read_events(ictx, 0);
- if (async_quit_request && !test_abort(ictx)) {
+ if (async_quit_request && !queue_has_abort_cmds(&ictx->cmd_queue)) {
struct mp_cmd *cmd = mp_input_parse_cmd(ictx, bstr0("quit"), "");
queue_add_head(&ictx->cmd_queue, cmd);
+ async_quit_request = 0;
}
struct cmd_queue *queue = &ictx->cmd_queue;
if (!queue->first) {