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

Re: (Revisited): zsh + less == hard hang of tty.

I apologize - I do not have strace output yet.

Potentially useful info, however:

- zsh -c 'less <FILE>' DOES HANG

- When I get a Linux tty to hang by doing this, log in on another tty,
  and kill the *less* process, it terminates, and any I/O that was in
  the buffer (from my extra keystrokes while less was hung) get
  interpreted by the shell. zsh becomes responsive again.

  (For example, once I hang the tty, I press enter three times, then
  type 'asdf'. Then, I kill less from another tty, and zsh spits out several
  new prompts, and 'asdf' is waiting there on the command-line. Everything
  I type while less is hung eventually gets passed to zsh once I kill less.)

- I can't reproduce this on an old RedHat 7.2 box with zsh 4.0.2 and
  less 358+iso248 (version string from 'less --version')

strace output soon.

- Larry

On Tue, Sep 26, 2006 at 06:00:39PM +0100, Peter Stephenson wrote:
> "Larry P. Schrof" wrote:
> > When in zsh, if I do: less <some_file>, the terminal HARD HANGS.
> It sounds like this is reproducible in your case.  Since this doesn't
> seem to be a general problem, we need to find out what's different.
> Does the same happen with
>   zsh -c 'less <file>'
> or, if not, with
>   zsh -ic 'less <file>'
> (which has interactive handling turned on)?  If so, the last few entries
> you get with "strace" in front of the appropriate one might be
> interesting.  You might get a huge amount of output in the second case
> owing to initialisation files.
> Otherwise, use gdb to attach to the hung process in question.  This is
> most useful if zsh was compiled with debugging (configure
> --enable-zsh-debug does that).
> % gdb zsh
> (gdb) attach 14183
> (gdb) bt
> However, it might actually be hung in less and zsh is simply waiting for
> that to finish.
> -- 
> Peter Stephenson <pws@xxxxxxx>                  Software Engineer
> CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
> Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070
> To access the latest news from CSR copy this link into a web browser:  http://www.csr.com/email_sig.php

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