cygthread::cygthread() hang

Joe Buehler
Fri Apr 11 14:45:00 GMT 2003

Christopher Faylor wrote:

> ...and there is still a much slower memory leak.  I inadvertantly left
> a test process running and came back to XP informing me that I didn't
> have enough virtual memory.  The test program had allocated a lot of
> space after 24 hours of once a second interrupts of a pipe read.  I
> don't know where the space is being used since the thread stack base
> obviously is being reused.  I guess this is one of those inavoidable
> leaks that occur when you play with fire, i.e., TerminateThread.

TerminateThread and TerminateProcess are considered evil, from what I
read.  Is there any way to avoid them?  For example, on a pipe read,
does Windows have something like select() so that the reader thread
can wait for a "terminate yourself" or a "data can be read from the pipe"
Joe Buehler

More information about the Cygwin-developers mailing list