summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/spawn.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/spawn.cc')
-rw-r--r--winsup/cygwin/spawn.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc
index ff2d56d39..87cfb3a69 100644
--- a/winsup/cygwin/spawn.cc
+++ b/winsup/cygwin/spawn.cc
@@ -570,6 +570,12 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv,
SetHandleInformation (my_wr_proc_pipe, HANDLE_FLAG_INHERIT, 0);
parent_winpid = GetCurrentProcessId ();
+ /* Workaround for the issue of the window of a spawned process
+ not coming to the foreground. A useless call to TranslateMessage
+ cures this somehow. */
+ MSG dummy = { 0 };
+ (void) TranslateMessage(&dummy);
+
loop:
/* When ruid != euid we create the new process under the current original
account and impersonate in child, this way maintaining the different