From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2574 invoked by alias); 10 Sep 2014 12:38:24 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 19060 Received: (qmail 18697 invoked from network); 10 Sep 2014 12:38:10 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.2 Date: Wed, 10 Sep 2014 14:30:32 +0200 From: Vincent Lefevre To: zsh-users@zsh.org Subject: child time accounting is different from other shells Message-ID: <20140910123032.GA19213@xvii.vinc17.org> Mail-Followup-To: zsh-users@zsh.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Mailer-Info: http://www.vinc17.net/mutt/ User-Agent: Mutt/1.5.23-6361-vl-r59709 (2014-07-25) With all shells I could test except zsh, time sh -c 'pi 500000 > /dev/null & sleep 2' where "pi 500000 > /dev/null" lasts for less than 2 seconds (or replace it with any command that takes CPU time less than 2 seconds), includes the time taken by this child process in the user/system times, but not with zsh: xvii% time sh -c 'pi 500000 > /dev/null & sleep 2' sh -c 'pi 500000 > /dev/null & sleep 2' 1.16s user 0.02s system 58% cpu 2.017 total xvii% time zsh -c 'pi 500000 > /dev/null & sleep 2' zsh -c 'pi 500000 > /dev/null & sleep 2' 0.00s user 0.00s system 0% cpu 2.023 total Is this a bug? Shouldn't this behavior be changed to make zsh consistent with the other shells? -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)