lock the process being checked for input (and subsequently C::B).
I did experience that problem with the svn/cvs plugin in very early versions. As an "optimization", I only polled output once in
OnTerminate. That way, you would get all output in one chunk, but that was fine.
The nasty thing about this approach is that it works perfectly for output less than the pipe size (4k). However, when the invoked program outputs more than 4k, the pipe will block, and you wonder why suddenly everything freezes. Checking out Code::Blocks suddenly froze my PC (by coincidence, as the project grew bigger, cvs output just crossed the 4k border) when all was fine the day before.
With regular polling via
OnTimer, I haven't experienced a similar problem yet.
If I remember correctly [...] stream wouldn't correctly return eof...
Oh yes, had that too, that's when you don't poll in
OnTerminate. When polling via
OnTimer, I thought "why poll again in
OnTerminate then!".
OnIdle 99.9% certainly polled just before the process dies, but
OnTimer only polls on fixed time intervals. After
OnTerminate,
m_process is
null, so
EOF is not correct.
PipedProcess does clean up in
OnTerminate, so it should actually work. Did you actually have such a problem recently, or are these only the heirs of long forgotten nightmares from the dark ages?
Maybe by simply changing OnTimer() to check for valid process before calling wxWakeUpIdle(), could satisfy all sides...
Sounds like a good compromise. That will eliminate idle messages as long as no compile is running. While a compile is running, CPU usage is ~99% anyway, so the cpu fan will spin up either way
What about the one being developed?
:oops: Was completely unaware of that.