[Scons-dev] Partial fix for mixed output with -j

Kenny, Jason L jason.l.kenny at intel.com
Fri Jun 22 12:51:12 EDT 2012


I implemented this in a spawn function in Parts, as I found this was the easiest place to do it. Make the default spawn function call subprocess.popen and remap those streams.

Jason

-----Original Message-----
From: scons-dev-bounces at scons.org [mailto:scons-dev-bounces at scons.org] On Behalf Of TOM TANNER (BLOOMBERG/ LONDON)
Sent: Friday, June 22, 2012 11:30 AM
To: scons-dev at scons.org
Subject: Re: [Scons-dev] Partial fix for mixed output with -j

I've moved the stderr/stdout interception into Job.py because it's easiest to make it behave as currently for non-parallel builds.

However there's no way I can get hold of the environment at that point.

This basically means that the 'spawn' functions in posix.py have been replaced with wrappers round the 'pspawn' functions.

However, it now behaves unchanged for non-parallel builds and the resulting code looks a bit nicer.

I looked at the windows piped spawn/exec spawn. I don't have anything equivalent I can try on windows, but the change should be to do the same thing. What would be nice though is to save the copying from tempfile to the scons stdout but I don't know well enough how windows does redirections.

This page: http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/redirection.mspx
sugggests that >> would work

I can put the diffs here next week if anyone is interested (I can't use bitbucket from work :-( )



----- Original Message -----
From: scons-dev at scons.org
To: scons-dev at scons.org
At: 6/22 12:43:27

I'm also interested in this improvement. If there's anything I can help with, send me an email

Bye
Roberto



> -----Original Message-----

> From: scons-dev-bounces at scons.org [mailto:scons-dev-

> bounces at scons.org] On Behalf Of TOM TANNER (BLOOMBERG/ LONDON)

> Sent: venerdì 22 giugno 2012 12:40

> To: scons-dev at scons.org

> Subject: Re: [Scons-dev] Partial fix for mixed output with -j

>

> I'd love to but our systems are very locked down.

>

> I'll see how far I can get.

>

> (and as you can see our email client is top-reply)

>

> ----- Original Message -----

> From: scons-dev at scons.org

> To: scons-dev at scons.org

> At: 6/21 17:02:49

>

> On 20 June 2012, TOM TANNER (BLOOMBERG/ LONDON) said:

> > OK, this is just a 'possible' at the moment. I'm not sure it's in

> > the right place (debug output still gets mixed up), it's possible

> > this should be part of the Task object, and it happens even with no

> > -j setting which is silly (but I don't know how to check for that),

> > but it

works

> wonderfully for parallel builds.

> >

> > However, I'd like some comments.

> >

> > Here's the diff output (a bit split up and mangled because I was

> > having problems with gmane)

> >

> > 109,112d109

> > < from threading import Lock, local

> > < import tempfile

> > < import sys

> > < import os

> > 114,145d110

> > < class Threaded_Output_Redirector:

> > < """ The general idea of this class is to allow redirection of

output to a

>

> Please send unified diffs! Easiest way: clone the scons repo from

> bitbucket.org (https://bitbucket.org/scons/scons), modify the code,

> and

use

> "hg diff" to generate your patch.

>

> It would be great to see less confusing output from parallel builds.

> Thanks for starting this work!

>

> Greg

> _______________________________________________

> Scons-dev mailing list

> Scons-dev at scons.org

> http://two.pairlist.net/mailman/listinfo/scons-dev

>

> _______________________________________________

> Scons-dev mailing list

> Scons-dev at scons.org

> http://two.pairlist.net/mailman/listinfo/scons-dev

>





_______________________________________________
Scons-dev mailing list
Scons-dev at scons.org
http://two.pairlist.net/mailman/listinfo/scons-dev

_______________________________________________
Scons-dev mailing list
Scons-dev at scons.org
http://two.pairlist.net/mailman/listinfo/scons-dev


More information about the Scons-dev mailing list