From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4777 invoked from network); 17 Feb 1999 16:19:41 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 17 Feb 1999 16:19:41 -0000 Received: (qmail 18150 invoked by alias); 17 Feb 1999 16:19:03 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 5411 Received: (qmail 18142 invoked from network); 17 Feb 1999 16:18:58 -0000 Message-Id: <9902171603.AA23593@ibmth.df.unipi.it> To: Ville Herva , zsh-workers@sunsite.auc.dk (Zsh hackers list) Subject: Re: Terminal problem with linux-2.0.34 In-Reply-To: "Ville Herva"'s message of "Wed, 17 Feb 1999 17:37:37 NFT." <19990217173737.D29924@niksula.cs.hut.fi> Date: Wed, 17 Feb 1999 17:03:02 +0100 From: Peter Stephenson 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 Tel: +39 050 844536 WWW: http://www.ifh.de/~pws/ Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy