Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: ommitted time on resume



On Aug 5,  4:21pm, Wayne Davison wrote:
}
} If I have a job running under "time", e.g. "time sleep 3" and the
} program gets suspended (via Ctrl-Z), the resumed program (via %) does
} not output its time. I tested the official ubuntu 4.3.11 version and
} the latest dev version.

Hm.  I wouldn't have expected it to print the time after the job was
foregrounded again.  Cf. bash:

bash-3.2$ time sleep 4
^Z
[1]+  Stopped                 sleep 4

real    0m0.672s
user    0m0.000s
sys     0m0.001s
bash-3.2$ fg
sleep 4
bash-3.2$ 

In order for the builtin time to behave like e.g. /usr/bin/time does,
it would have to run *itself* in an external process rather than run
the subcommand in an external process.

I'm undecided on whether zsh's behavior on TSTP (skip reporting the
time entirely) is preferable.  The only ksh to which I have access
behaves the same as bash.



Messages sorted by: Reverse Date, Date, Thread, Author