summaryrefslogtreecommitdiffstats
path: root/osdep/subprocess-win.c
Commit message (Collapse)AuthorAgeFilesLines
* win32: request UTF-16 API variants, Vista+ APIs, and COM C macroswm42015-01-251-1/+0
| | | | | | | | | Put the Vista+ (_WIN32_WINNT) and the COM C (COBJMACROS) defines into the build system, instead of defining them over and over in the code. Conflicts: video/out/w32_common.c waftools/checks/custom.py
* subprocess: allow disabling redirection of stdout/stderrwm42015-01-251-2/+6
| | | | | | | | | If the stdout or stderr write callback is NULL, then don't redirect this stream. Preparation for the next commit. Not sure what to do on Windows; it seems STARTUPINFO doesn't allow redirection only one of them. So just let them write nothing. For our intended use-case (next commit), this is probably sensible.
* subprocess-win: Always quote argv[0]James Ross-Gowan2015-01-251-3/+5
| | | | | | | | | | | | | If the program name isn't quoted and the .exe it refers to isn't found, CreateProcess will add the program arguments to the program name and continue searching, so for "program arg1 arg2", CreateProcess would try "program.exe", "program arg1.exe", then "program arg1 arg2.exe". This behaviour is weird and not really desirable, so prevent it by always quoting the program name. When quoting argv[0], escape sequences shouldn't be used. msvcrt, .NET and CommandLineToArgvW all treat argv[0] literally and end it on the trailing quote, without processing escape sequences.
* subprocess-win: remove a Vista-only flagJames Ross-Gowan2014-11-281-3/+2
| | | | | PIPE_REJECT_REMOTE_CLIENTS isn't supported on XP. It's not really needed, so remove it. Also fix error checking for CreateNamedPipe.
* subprocess: minor cosmetic cleanupwm42014-11-221-2/+3
| | | | | Don't recursively include the whole stream.h header; only include what's minimally needed, and handle the rest with forward declarations.
* lua: subprocess: move to osdep/subprocess-{win,posix}.cJames Ross-Gowan2014-11-221-0/+371
The subprocess code was already split into fairly general functions, separate from the Lua code. It's getting pretty big though, especially the Windows-specific parts, so move it into its own files.