zsh-users
 help / color / mirror / code / Atom feed
From: Ville Herva <vherva@niksula.hut.fi>
To: zsh-users@sunsite.auc.dk
Cc: sak@iki.fi
Subject: Re: Terminal problem with linux-2.0.34
Date: Wed, 17 Feb 1999 17:37:37 +0200	[thread overview]
Message-ID: <19990217173737.D29924@niksula.cs.hut.fi> (raw)


First off, I just noticed that although the problem appears with 3.1.5 and
zsh-3.1.5-pws-8, it is a bit different (better) compared to 3.0.5: 
everything I type gets echoed just fine, but pressing backspace works only
once, after that, the edits won't be echoed. Also moving on the command
line with arrow keys loses the cursor. To execute the command line, two
returns are needed. 

> Peter Stephenson <pws@ibmth.df.unipi.it> wrote:
>
> "Larry P . Schrof" wrote:
>
> > - Any time the user runs a program that makes a stat() call, the
> > shell hangs forever, until the user breaks out of it. Even after sending
> > the process, say ls -l, a signal, it takes awhile to get the shell prompt
> > back.
>
>Something this weird suggests zsh is tickling something in Linux, and
>also
>suggests the only way to find out what is just painfully to comment bits
>of
>code out until it goes away; it's probably not just zle.  (Does the
>stat()
>problem go away if you run zsh without zle?)

Today, I came across a very interesting problem with tha same linux
machine: the clock() function would always return -1! A little
sample prog:

vherva@turing:/home/vherva/zsh-3.1.5-pws-8/Src>cat ../../c.c
#include <time.h>
#include <stdio.h>

int main(int argc, char* argv[]) 
{
   int i;
   int timer = clock();
   for (i = 1000000; i; i--);  
   printf("timer: %i\nclock(): %i\nCLK_TCK: %i\n"
          "CLOCKS_PER_SEC: %i\n%3.2f 3.2f secs.\n", 
          timer, clock(), CLK_TCK, CLOCKS_PER_SEC,
          (float)(clock() - timer) / (float)CLK_TCK / 10000.0,
          (float)(clock() - timer) / (float)CLOCKS_PER_SEC);

   return 1;
}
vherva@turing:/home/vherva/zsh-3.1.5-pws-8/Src>gcc ../../c.c -o ../../c
vherva@turing:/home/vherva/zsh-3.1.5-pws-8/Src>../../c
timer: -1
clock(): -1
CLK_TCK: 100
CLOCKS_PER_SEC: 1000000
0.00 3.2f secs.

Now, making little heuristic guess I figured that

vherva@turing:/home/vherva/zsh-3.1.5-pws-8/Src>perl -e '$CLK_TCK = 100;
print 2**31 / $CLK_TCK / 60 / 60 / 24, " days\n"'
248.551348148148 days

which is quite accurately the uptime, zsh became not to work.

This, of course won't explain why zsh messes the command line, while other
shells do not. Is clock() or any similar function used in zle? (There is a
possibility that other timing functions fail, also - it seems that a
counter in the kernel has wrapped around, and libc goes nuts, or something
like that.)

Also, this might explain the other problems Larry Schrof had.

I'll be forwarding this problem to linux-kernel list.

>Also, it would be worth making sure it isn't in the latest development
>version
>http://www.ifh.de/~pws/computing/zsh-3.1.5-pws-8.tar.gz
>since the stuff that opens the terminal has changed a bit.

Zsh-3.1.5-pws-8 seems to behave exactly like zsh-3.1.5.
 

-- v --

v@iki.fi


             reply	other threads:[~1999-02-17 15:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-02-17 15:37 Ville Herva [this message]
  -- strict thread matches above, loose matches on Subject: below --
1999-02-14  9:26 vherva
1999-02-14 13:15 ` Bart Schaefer
1999-02-14 13:50   ` Ville Herva
1999-02-14 17:46     ` Bart Schaefer
1999-02-14 21:48       ` Ville Herva
1999-02-14 23:59         ` Bart Schaefer
1999-02-15  5:38           ` Ville Herva
1999-02-15 15:20 ` Larry P . Schrof
1999-02-15 17:56   ` Thomas Köhler
1999-02-15 18:22     ` Larry P . Schrof
1999-02-17  9:06       ` Thomas Köhler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19990217173737.D29924@niksula.cs.hut.fi \
    --to=vherva@niksula.hut.fi \
    --cc=sak@iki.fi \
    --cc=zsh-users@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).