mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-01 00:54:24 +03:00
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.
This commit is contained in:
parent
f414f394d1
commit
71f50408e0
@ -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.
|
||||
|
@ -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...)");
|
||||
|
Loading…
Reference in New Issue
Block a user