zsh-users
 help / color / mirror / code / Atom feed
* child time accounting is different from other shells
@ 2014-09-10 12:30 Vincent Lefevre
  2014-09-10 21:02 ` Bart Schaefer
  0 siblings, 1 reply; 3+ messages in thread
From: Vincent Lefevre @ 2014-09-10 12:30 UTC (permalink / raw)
  To: zsh-users

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 <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-09-16 10:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-10 12:30 child time accounting is different from other shells Vincent Lefevre
2014-09-10 21:02 ` Bart Schaefer
2014-09-16 10:45   ` Vincent Lefevre

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).