make question
Roman Divacky
rdivacky at freebsd.org
Wed Apr 27 19:57:33 UTC 2011
hi harti!
You seem to have messed with bsd make so I have a question for you :)
When a job is about to be executed in JobStart() a pipe is created with
its ends connected to job->inPipe/job->outPipe. When the job is actually
created in JobExec() the ps.out is set to job->outPipe so that in
JobDoOutput() we can read from that pipe and basically just parse the output
for shell->noPrint and leaving it out from the output. This is meant (I think)
for supressing the "filter" thing. Ie. that if we do some @command the
restoration of setting of quiet mode is filtered out.
In -B mode we do it differently, as we invoke one shell per command we don't
have to insert quiet/verbose commands and thus avoid all the piping/parsing
dance.
So my question is - why don't we invoke one shell per command by default
and avoid the piping/parsing? Is this because of performance? I think that
the piping/parsing of the output can have worse impact than invoking a shell
for every command. Especially given that most targets consists of just one
command.
Thank you for the answer!
Roman
More information about the freebsd-hackers
mailing list