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

Re: zsh hangs on IRIX 5.2 / me to: (SunOS4.1.3 + Solaris 2.4)



I have put a few printf's in the code and found out that the endless
loop of zsh does not occur in the quotes piece of code from zle_main.c.
It must be somewhere else, but I have no clue of where to look.
Perhaps a signal handling problem?

-- Achim --



Peter Stephenson writes on March 25:
 > leibniz!stucki@xxxxxxxxxxxxxxxxxxxxxxxxx wrote:
 > > - BUT a zsh WAITING FOR A PROCESS TO COMPLETE,
 > >   RUNS FOREVER READING 'nothing' FROM STDIN
 > >   IF THE SUBPROCESS VANISHES AND
 > >   ZSH WAKES UP ON A 'DEAD' TTY.
 > 
 > You can at least see if this is the problem by removing the
 > `if (isset(IGNOREEOF)...) continue' and seeing if the problem goes
 > away.  That will have the side-effect that a ^D in typeahead will
 > cause the shell to exit.
 > 
 > [part from zle_main.c]
 > while ((r = read(SHTTY, &cc, 1)) != 1) {  
 >     if (r == 0) {
 > 	/* The test for IGNOREEOF was added to make zsh ignore ^Ds
 > 	   that were typed while commands are running.  Unfortuantely
 > 	   this caused trouble under at least one system (SunOS 4.1).
 > 	   Here shells that lost their xterm (e.g. if it was killed
 > 	   with -9) didn't fail to read from the terminal but instead
 > 	   happily continued to read EOFs, so that the above read
 > 	   returned with 0, and, with IGNOREEOF set, this caused
 > 	   an infinite loop.  The simple way around this was to add
 > 	   the counter (icnt) so that this happens 20 times and than
 > 	   the shell gives up (yes, this is a bit dirty...). */
 > 	if (isset(IGNOREEOF) && icnt++ < 20)
 > 	    continue;
 > 	stopmsg = 1;
 > 	zexit(1);
 >     }
[...]




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