The root cause of problem with strace causing long delays when any process enumerates the process database appears to be calling myself.thisproc () from child_info_spawn::handle_spawn() when we've dynamically loaded cygwin1.dll. It definately fixes the problem, but I don't konw what other processes dynamically load cygwin1.dll and, thus, what other side-effects that this may have. Please verify correctness.
Please see discussion here: https://cygwin.com/ml/cygwin/2017-04/msg00240.html Daniel Signed-off-by: Daniel Santos <[email protected]> --- winsup/cygwin/dcrt0.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc index ea6adcbbd..bbab08725 100644 --- a/winsup/cygwin/dcrt0.cc +++ b/winsup/cygwin/dcrt0.cc @@ -664,7 +664,8 @@ child_info_spawn::handle_spawn () my_wr_proc_pipe = wr_proc_pipe; rd_proc_pipe = wr_proc_pipe = NULL; - myself.thisproc (h); + if (!dynamically_loaded) + myself.thisproc (h); __argc = moreinfo->argc; __argv = moreinfo->argv; envp = moreinfo->envp; -- 2.11.0
