Skip to content

Commit 9354930

Browse files
committed
fix(windows): hide daemon child process windows
Signed-off-by: mlandolfi90 <mlandolfi90@users.noreply.github.com>
1 parent b6fe834 commit 9354930

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

‎src/foundation/compat_fs.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,8 +310,9 @@ static FILE *cbm_popen_isolated(const char *cmd, const char **stage, DWORD *gle)
310310
*stage = "cmdline";
311311
*gle = ERROR_NOT_ENOUGH_MEMORY;
312312
} else {
313-
created = CreateProcessW(app, wcmdline, NULL, NULL, TRUE, EXTENDED_STARTUPINFO_PRESENT,
314-
NULL, NULL, &si.StartupInfo, &pi);
313+
created = CreateProcessW(app, wcmdline, NULL, NULL, TRUE,
314+
EXTENDED_STARTUPINFO_PRESENT | CREATE_NO_WINDOW, NULL, NULL,
315+
&si.StartupInfo, &pi);
315316
if (!created) {
316317
*stage = "spawn";
317318
*gle = GetLastError();

‎src/foundation/subprocess.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,8 @@ static int cbm_subprocess_spawn_win(cbm_subprocess_t *process) {
730730

731731
PROCESS_INFORMATION child;
732732
ZeroMemory(&child, sizeof(child));
733-
DWORD flags = EXTENDED_STARTUPINFO_PRESENT | CREATE_SUSPENDED | CREATE_NEW_PROCESS_GROUP;
733+
DWORD flags = EXTENDED_STARTUPINFO_PRESENT | CREATE_SUSPENDED | CREATE_NEW_PROCESS_GROUP |
734+
CREATE_NO_WINDOW;
734735
BOOL created = CreateProcessW(wbin, wcmdline, NULL, NULL, TRUE, flags, NULL, NULL,
735736
&startup.StartupInfo, &child);
736737
cbm_win_close_spawn_handles(nul, log, attrs, attrs_init);

0 commit comments

Comments
 (0)