From owner-freebsd-hackers@FreeBSD.ORG Wed Apr 27 19:57:33 2011 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5641A106564A; Wed, 27 Apr 2011 19:57:33 +0000 (UTC) (envelope-from rdivacky@vlakno.cz) Received: from vlakno.cz (lev.vlakno.cz [46.28.110.116]) by mx1.freebsd.org (Postfix) with ESMTP id 1F95D8FC16; Wed, 27 Apr 2011 19:57:32 +0000 (UTC) Received: by vlakno.cz (Postfix, from userid 1002) id 83E657F3ACC; Wed, 27 Apr 2011 21:39:46 +0200 (CEST) Date: Wed, 27 Apr 2011 21:39:46 +0200 From: Roman Divacky To: harti@freebsd.org Message-ID: <20110427193946.GA41659@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Cc: hackers@freebsd.org Subject: make question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Apr 2011 19:57:33 -0000 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