From 03c70a8d81f14ce46bc3410b08f5956d6af34d82 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 27 Jun 2015 21:08:55 +0200 Subject: subprocess, lua: export whether the process was killed by us We want to distinguish actual errors, and just aborting the program intentionally. Also be a bit more careful with handling the wait() exit status: do not called WEXITSTATUS() without checking WIFEXITED() first. --- osdep/subprocess-win.c | 1 + 1 file changed, 1 insertion(+) (limited to 'osdep/subprocess-win.c') diff --git a/osdep/subprocess-win.c b/osdep/subprocess-win.c index a5be9e52ab..3f0330958b 100644 --- a/osdep/subprocess-win.c +++ b/osdep/subprocess-win.c @@ -357,6 +357,7 @@ int mp_subprocess(char **args, struct mp_cancel *cancel, void *ctx, if (pi.hProcess) { TerminateProcess(pi.hProcess, 1); *error = "killed"; + status = MP_SUBPROCESS_EKILLED_BY_US; goto done; } break; -- cgit v1.2.3