Expand description
Starting other programs from the app without a console window (#41).
The app is a GUI process: on Windows every console program it starts
(git, op, taskkill, …) gets a console window of its own unless the
spawn sets CREATE_NO_WINDOW. Every Command that core or the app
starts goes through hide_window; a test
(tests/no_console_window.rs) keeps it that way.
Hiding is opt-in per process: the app calls hide_console_windows
once at start-up. The CLI never does, so the git and op it starts
keep its console: an ssh prompt reaches the user’s terminal and Ctrl+C
reaches git.
Constants§
- CREATE_
NO_ WINDOW CREATE_NO_WINDOW: the child runs without a console window.
Functions§
- hide_
console_ windows - From now on
hide_windowstarts programs without a console window. For GUI processes (the app), called once before anything is started. - hide_
window - Starts
commandwithout a console window on Windows once this process calledhide_console_windows; otherwise (the CLI, other OSes) it does nothing and the child shares the parent’s console. - hiding_
console_ windows - True once
hide_console_windowswas called in this process.