summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--winsup/cygwin/Makefile.in3
-rw-r--r--winsup/cygwin/spawn.cc5
2 files changed, 7 insertions, 1 deletions
diff --git a/winsup/cygwin/Makefile.in b/winsup/cygwin/Makefile.in
index 73d9b37fd..74dbca3e3 100644
--- a/winsup/cygwin/Makefile.in
+++ b/winsup/cygwin/Makefile.in
@@ -136,7 +136,8 @@ EXTRA_OFILES:=
MALLOC_OFILES:=malloc.o
-DLL_IMPORTS:=${shell $(CC) -print-file-name=w32api/libkernel32.a} ${shell $(CC) -print-file-name=w32api/libntdll.a}
+DLL_IMPORTS:=${foreach i,kernel32 user32 ntdll,\
+ ${shell $(CC) -print-file-name=w32api/lib${i}.a}}
#
LIBC_OFILES:= \
diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc
index 676e5d798..a4071c986 100644
--- a/winsup/cygwin/spawn.cc
+++ b/winsup/cygwin/spawn.cc
@@ -715,6 +715,11 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv,
if (!iscygwin ())
init_console_handler (myself->ctty > 0);
+ /* 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