This is the mail archive of the cygwin-developers@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: snapshot 20050114 race (on list)



Christopher Faylor wrote:

> 
> Thanks.  That script unearthed at least two races in the proc_waiter
> code.  One was a "how in the world could it ever work" type.  I was
> inadvertently relying on the fact that the last process created would be
> the first process to exit.  It's amazing that this passed the test suite.
> I guess I need to beef up that aspect of it.

I had never noticed that procs was an array of pinfo's, and not
an array of pointers to pinfos, and that pinfo's were being copied
when processes terminate and in proc_waiter.

But pinfo's contain a CRITICAL_SECTION and according to
<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/initializecriticalsection.asp>:
 A critical section object cannot be moved or copied. 
 The process must also not modify the object, but must treat it
 as logically opaque. Use only the critical section functions to
 manage critical section objects. When you have finished using the
 critical section, call the DeleteCriticalSection function.

I know that the hard way. fhandler_dsp was freezing WinME 
and that was one of the problems (there were several
problems, I never found exactly which was the culprit).

Pierre


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]