diff options
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/cygwin/Makefile.in | 3 | ||||
-rw-r--r-- | winsup/cygwin/spawn.cc | 6 |
2 files changed, 8 insertions, 1 deletions
diff --git a/winsup/cygwin/Makefile.in b/winsup/cygwin/Makefile.in index 10e6b1f81..c8d267172 100644 --- a/winsup/cygwin/Makefile.in +++ b/winsup/cygwin/Makefile.in @@ -147,7 +147,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}} MT_SAFE_OBJECTS:= # diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index 05020952a..758447e9d 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -566,6 +566,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 |