libobs: Log if CreateProcessW fails on Windows

This is used by the test programs as well as ffmpeg-mux. If a process
fails to start it's quite bad so we would like to know why.
This commit is contained in:
Richard Stanway
2023-08-26 01:25:07 +02:00
committed by Lain
parent 8e7b697447
commit fef92a8a43

View File

@@ -70,6 +70,11 @@ static inline bool create_process(const char *cmd_line, HANDLE stdin_handle,
if (success) {
*process = pi.hProcess;
CloseHandle(pi.hThread);
} else {
// Not logging the full command line is intentional
// as it may contain stream keys etc.
blog(LOG_ERROR, "CreateProcessW failed: %lu",
GetLastError());
}
bfree(cmd_line_w);