Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
child time accounting is different from other shells
- X-seq: zsh-users 19060
- From: Vincent Lefevre <vincent@xxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: child time accounting is different from other shells
- Date: Wed, 10 Sep 2014 14:30:32 +0200
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mail-followup-to: zsh-users@xxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
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@xxxxxxxxxx> - 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)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author