mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-03 20:38:40 +00:00
stdout/stderr/stdin file path overrides for targets
This commit is contained in:
@@ -123,6 +123,8 @@ struct OS_ProcessLaunchParams
|
||||
B32 inherit_env;
|
||||
B32 consoleless;
|
||||
OS_Handle stdout_file;
|
||||
OS_Handle stderr_file;
|
||||
OS_Handle stdin_file;
|
||||
};
|
||||
|
||||
////////////////////////////////
|
||||
|
||||
@@ -941,7 +941,21 @@ os_process_launch(OS_ProcessLaunchParams *params)
|
||||
startup_info.hStdOutput = stdout_handle;
|
||||
startup_info.dwFlags |= STARTF_USESTDHANDLES;
|
||||
inherit_handles = 1;
|
||||
}
|
||||
}
|
||||
if(!os_handle_match(params->stderr_file, os_handle_zero()))
|
||||
{
|
||||
HANDLE stderr_handle = (HANDLE)params->stderr_file.u64[0];
|
||||
startup_info.hStdError = stderr_handle;
|
||||
startup_info.dwFlags |= STARTF_USESTDHANDLES;
|
||||
inherit_handles = 1;
|
||||
}
|
||||
if(!os_handle_match(params->stdin_file, os_handle_zero()))
|
||||
{
|
||||
HANDLE stdin_handle = (HANDLE)params->stdin_file.u64[0];
|
||||
startup_info.hStdInput = stdin_handle;
|
||||
startup_info.dwFlags |= STARTF_USESTDHANDLES;
|
||||
inherit_handles = 1;
|
||||
}
|
||||
PROCESS_INFORMATION process_info = {0};
|
||||
if(CreateProcessW(0, (WCHAR*)cmd16.str, 0, 0, inherit_handles, creation_flags, use_null_env_arg ? 0 : (WCHAR*)env16.str, (WCHAR*)dir16.str, &startup_info, &process_info))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user