* src/subshell.c: Reason: in feed_subshell() we are trying to read
	from shell pty,check for retval==-1 && errno != EIO. In that case
	we flame and exit. Otherwise we are trying to write what we've
	read. Good luck doing it if we got errno==EIO, which is _normal_
	for situation when shell just died. Resulting write(1,foo,~0U) is
	somewhat excessively, erm, verbose.
This commit is contained in:
Miguel de Icaza 2000-01-02 23:52:49 +00:00
parent f414f394d1
commit 71f50408e0
2 changed files with 17 additions and 1 deletions

View File

@ -1,3 +1,12 @@
2000-01-02 viro@math.psu.edu
* src/subshell.c: Reason: in feed_subshell() we are trying to read
from shell pty,check for retval==-1 && errno != EIO. In that case
we flame and exit. Otherwise we are trying to write what we've
read. Good luck doing it if we got errno==EIO, which is _normal_
for situation when shell just died. Resulting write(1,foo,~0U) is
somewhat excessively, erm, verbose.
1999-12-21 Pavel Roskin <pavel_roskin@geocities.com>
* src/main.c, src/view.c: #warning's replaced with FIXME's.

View File

@ -932,7 +932,14 @@ static int feed_subshell (int how, int fail_on_error)
/* for (i=0; i<5; ++i) * FIXME -- experimental */
{
bytes = read (subshell_pty, pty_buffer, pty_buffer_size);
if (bytes == -1 && errno != EIO)
/* Patch from viro@math.psu.edu
* add by MichaelBramer (Debian MC-Maintainer */
if (bytes == -1 && errno == EIO && !subshell_alive)
{
return FALSE;
}
if (bytes == -1)
/* end from the patch */
{
tcsetattr (STDOUT_FILENO, TCSANOW, &shell_mode);
perror ("\n"__FILE__": read (subshell_pty...)");