diff options
author | Cheng Zhao <zcbenz@gmail.com> | 2021-08-09 14:02:50 +0300 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2021-08-17 20:17:16 +0300 |
commit | fae352a0f5b37e2b4a1b0c636cc786b4a3e6e496 (patch) | |
tree | 477c757b29b3bbeb295db77964bf5d3a8cb9cc75 /src/node.h | |
parent | f42d7a4552cdf3604833c61cf1d7923b9602833d (diff) |
build: add option to hide console window
Adds a Environment flag to allow embedders to set CREATE_NO_WINDOW
property when spawning processes, which is useful for GUI programs
that do not want to show console windows when running terminal
commands.
PR-URL: https://github.com/nodejs/node/pull/39712
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Shelley Vohr <shelley.vohr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/node.h')
-rw-r--r-- | src/node.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/node.h b/src/node.h index 1628a2147ea..98ed50a6cd2 100644 --- a/src/node.h +++ b/src/node.h @@ -403,7 +403,11 @@ enum Flags : uint64_t { kNoRegisterESMLoader = 1 << 3, // Set this flag to make Node.js track "raw" file descriptors, i.e. managed // by fs.open() and fs.close(), and close them during FreeEnvironment(). - kTrackUnmanagedFds = 1 << 4 + kTrackUnmanagedFds = 1 << 4, + // Set this flag to force hiding console windows when spawning child + // processes. This is usually used when embedding Node.js in GUI programs on + // Windows. + kHideConsoleWindows = 1 << 5 }; } // namespace EnvironmentFlags |