help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: running parallel make jobs and avoiding jumbled/garbled output?


From: Per Jessen
Subject: Re: running parallel make jobs and avoiding jumbled/garbled output?
Date: Fri, 22 Feb 2008 18:55:27 +0100
User-agent: KNode/0.10.4

Per Jessen wrote:

>> I'm pretty sure that line buffering settings are user-space features,
>> not process features, and as such they are not inherited by
>> sub-processes but rather determined anew for every process that
>> starts, based on its terminal settings, etc.
> 
> Hmm, when a new process is forked, I'm pretty certain the default is
> for it to continue using whatever stdin/out/err settings the parent
> process was using.

OK, I tried prefixing the call to make with the following:

int main( int argc, char **argv )
{
        setlinebuf(stdout);
        setlinebuf(stderr);

        execvp( argv[1], argv+1 );
}

such that stdout and stderr would have line buffering set from the
beginning.  Didn't change a thing though. 


/Per Jessen, Z├╝rich





reply via email to

[Prev in Thread] Current Thread [Next in Thread]