aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2019-02-17 13:59:17 +0000
committerRon Yorston <rmy@pobox.com>2019-02-17 13:59:17 +0000
commit743580b4c029e200b1390075a1328ab314973bc2 (patch)
treeee967e8fe9f8c2016d50fddbe2b8837b6fa7aa79 /shell
parent5d710374afe4545d8e14c0559857b50ceceb1df3 (diff)
downloadbusybox-w32-743580b4c029e200b1390075a1328ab314973bc2.tar.gz
busybox-w32-743580b4c029e200b1390075a1328ab314973bc2.tar.bz2
busybox-w32-743580b4c029e200b1390075a1328ab314973bc2.zip
ash: updated support for hiding console
Move the code to hide the console to a separate function in win32/mingw.c. Use lazy loading to avoid problems on platforms where the require APIs aren't supported (PR #70). Enable console hiding in the default 64-bit configuration.
Diffstat (limited to 'shell')
-rw-r--r--shell/ash.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 0040fd3c8..89bd886d3 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -172,8 +172,7 @@
172//config: Enable support for the 'noconsole' option, which attempts to 172//config: Enable support for the 'noconsole' option, which attempts to
173//config: hide the console normally associated with a command line 173//config: hide the console normally associated with a command line
174//config: application. This may be useful when running a shell script 174//config: application. This may be useful when running a shell script
175//config: from a GUI application. Disable this if your platform doesn't 175//config: from a GUI application.
176//config: support the required APIs.
177//config: 176//config:
178//config:endif # ash options 177//config:endif # ash options
179 178
@@ -14917,13 +14916,8 @@ int ash_main(int argc UNUSED_PARAM, char **argv)
14917#endif 14916#endif
14918 14917
14919#if ENABLE_ASH_NOCONSOLE 14918#if ENABLE_ASH_NOCONSOLE
14920 if ( noconsole ) { 14919 if (noconsole)
14921 DWORD dummy; 14920 hide_console();
14922
14923 if ( GetConsoleProcessList(&dummy, 1) == 1 ) {
14924 ShowWindow(GetConsoleWindow(), SW_HIDE);
14925 }
14926 }
14927#endif 14921#endif
14928 14922
14929 if (login_sh) { 14923 if (login_sh) {