[Scons-dev] Fix async subprocess execution with proper handling of std* streams

anatoly techtonik techtonik at gmail.com
Tue Feb 18 07:30:34 EST 2014


On Wed, Feb 12, 2014 at 6:25 PM, Kenny, Jason L <jason.l.kenny at intel.com> wrote:

>> Fix async subprocess execution with proper handling of std* streams.

>

> So I fixed the issue with output in Parts. I not saying it could not be

> clean up some more. However it solves the output issues, and adds coloring (

> which seems to need some fixing in certain cases.. ie mac mostly) and

> logging support. It might not be too hard for someone to move the code over

> to SCons and integrated its usage into SCons.


Do you have, by any chance a description of output issues?
It seems that I've lost my list during the last Windows partition crash.

Also, can you pinpoint the parts in Parts that are relevant to the issues?
I may have time to port them over to SCons.

My approach
https://bitbucket.org/techtonik/absub
to make subprocess asynchronous by moving processing
of input/output streams into separate threads. I don't remember why, but the
work stalled. I remember there was some kind of error that I was not able to
debug due to distributed nature of the process. I needed to write more tests
for that, but it is either I run out of time, multithreaded tests were
complicated
or I just had an annual Windows filesystem crash.

Now I am thinking about replacing concept of input/output streams with the
concept of channel, which is a queue of strings with limited size. The queue
can be rotated to become unlimited. Can be synchronous to wait (block)
until messages are read if the queue is full. This may help to clear confusion
around all that input output streams handling, pipes and descriptor
inheritances.

--
anatoly t.


More information about the Scons-dev mailing list