From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14297 invoked from network); 29 Sep 2001 22:39:35 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 29 Sep 2001 22:39:35 -0000 Received: (qmail 22979 invoked by alias); 29 Sep 2001 22:39:27 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 15902 Received: (qmail 22963 invoked from network); 29 Sep 2001 22:39:25 -0000 From: Bart Schaefer Message-Id: <1010929223918.ZM20169@candle.brasslantern.com> Date: Sat, 29 Sep 2001 22:39:18 +0000 In-Reply-To: <20010929181100.I16561@hithaeglir.net> Comments: In reply to lordzork@lordzork.com "Re: error on TTY read: no such file or directory" (Sep 29, 6:11pm) References: <20010911084904.A11501@hithaeglir.net> <1010911140155.ZM24429@candle.brasslantern.com> <20010928121347.B16561@hithaeglir.net> <3BB56D03.2000300@mow.siemens.ru> <20010929034953.E16561@hithaeglir.net> <3BB62E93.10802@mow.siemens.ru> <20010929170811.G16561@hithaeglir.net> <3BB63D16.5040709@mow.siemens.ru> <20010929173848.H16561@hithaeglir.net> <3BB64378.8060505@mow.siemens.ru> <20010929181100.I16561@hithaeglir.net> X-Mailer: Z-Mail (5.0.0 30July97) To: lordzork@lordzork.com, zsh-workers@sunsite.dk Subject: Re: error on TTY read: no such file or directory MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Sep 29, 6:11pm, lordzork@lordzork.com wrote: } } ((UID)) || { } set -x } exec 2>|/tmp/login-trace } } You can take that out now, it isn't helping. } > It was not my question. I do not understand where this data comes from } > and how can read one byte return 1025 bytes. It looks more like a } > contents of readdir() but I have no idea how can it appear on shell input. The data printed by strace is misleading. read() is being called with the address of single character (line 405 of zle_main.c): r = read(SHTTY, &cc, 1); Strace displays the arguments as they were passed *to* the read() call, not as they are returned, so what you're seeing in the trace is just stack garbage. Nevertheless, the problem is that read() is returning a positive integer greater than the number of bytes it was asked to read. This confuses the getkey() loop, which only expects that `r' can be 1, 0, or -1 at that point. You need to find out why your read() call is so badly broken! -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net