0

I am trying to setup a SCons based build.

Each builder that I am using has more than one action that can write in console using sys.stdout.write() .

The problem is that the console output is mixed between different jobs.

Is there a fix available ? I want to have all the console output for a particular job in the same place after its execution.

John Smith
  • 777
  • 2
  • 14
  • 37

1 Answers1

0

You are trying to access the same resource (stdout) from several processes that are running in parallel...there is no simple fix for that (see also xargs: losing output when redirecting stdout to a file in parallel mode ).

What you could try is to write the output for each intermediate action to a temporary file, and then with the last action write the complete and aggregated output from file to stdout finally. Like this, you have larger consecutive blobs of text in the output...but you might also lose some information when an intermediate action kills the build by throwing an exception for example. Then you won't get any output at all possibly...which makes debugging much harder.

Community
  • 1
  • 1
dirkbaechle
  • 3,984
  • 14
  • 17