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

Re: Terminal problem with linux-2.0.34



Ville Herva wrote:
> Today, I came across a very interesting problem with tha same linux
> machine: the clock() function would always return -1!

clock() isn't used directly in 3.1.5, but times(), which is closely
related, is used.  You can see if the bug shows up there just by typing
`times' (plus two returns :-(), which would typically report a few seconds'
usage.  However, it doesn't look like it should be crucial, though if
there's a kernel bug around, all bets are off.

If system calls are tickling a deeper problem, then apart from times() the
other chief suspect might be getrlimit(), because of its association with
times for processes, though times() is more likely.  A brief trial on
2.0.32 suggests neither /bin/bash (1.14.7(1)) nor /bin/tcsh (6.07.02) use
times() in their initialisation, and only call getrlimit() for
RLIMIT_NOFILE (bash) or only when told to (tcsh) --- zsh calls times()
after every command and reads all the limits when starting.  If you feel
interested enough to comment out all the calls to times(), that should be
harmless enough in terms of side effects.

-- 
Peter Stephenson <pws@xxxxxxxxxxxxxxxxx>       Tel: +39 050 844536
WWW:  http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy



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