I've tracked it down to this little Sleep() loop in pinfo::init.
bool created = shloc != SH_JUSTOPEN;
/* Detect situation where a transitional memory block is being
retrieved.
If the block has been allocated with PINFO_REDIR_SIZE but not yet
updated with a PID_EXECED state then we'll retry. */
if (!created && !(flag & PID_NEW))
/* If not populated, wait 2 seconds for procinfo to become populated.
Would like to wait with finer granularity but that is not easily
doable. */
for (int i = 0; i < 200 && !procinfo->ppid; i++)
Sleep (10);
I tried putting a stupid memory barrier in the loop and a volatile read
just for kicks, but that doesn't seem to be the problem. I'm headed off
to bed. This only happens when using strace, so if anybody has ideas
please post.
Daniel
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple