diff options
author | wm4 <wm4@nowhere> | 2015-06-27 21:08:55 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-06-27 21:08:55 +0200 |
commit | 03c70a8d81f14ce46bc3410b08f5956d6af34d82 (patch) | |
tree | 39f71e3672e99990eaa665a58a6f3a174c025a54 /osdep/subprocess-win.c | |
parent | 6ffb1e2b661464bc31e2cfffd1d77727f27e1561 (diff) | |
download | mpv-03c70a8d81f14ce46bc3410b08f5956d6af34d82.tar.bz2 mpv-03c70a8d81f14ce46bc3410b08f5956d6af34d82.tar.xz |
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.
Diffstat (limited to 'osdep/subprocess-win.c')
-rw-r--r-- | osdep/subprocess-win.c | 1 |
1 files changed, 1 insertions, 0 deletions
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; |