1
1

* subshell.c (feed_subshell): Don't wait forever after the first

select() call if fail_on_error is true.  This alleviates hang
with zsh on QNX Neutrino.
Этот коммит содержится в:
Pavel Roskin 2001-08-24 02:17:15 +00:00
родитель 11bc824c4a
Коммит 7dbf6695ff
2 изменённых файлов: 9 добавлений и 6 удалений

Просмотреть файл

@ -1,3 +1,9 @@
2001-08-23 Pavel Roskin <proski@gnu.org>
* subshell.c (feed_subshell): Don't wait forever after the first
select() call if fail_on_error is true. This alleviates hang
with zsh on QNX Neutrino.
2001-08-21 Pavel Roskin <proski@gnu.org> 2001-08-21 Pavel Roskin <proski@gnu.org>
* view.h: Declare view_dlg. * view.h: Declare view_dlg.

Просмотреть файл

@ -986,12 +986,12 @@ static int feed_subshell (int how, int fail_on_error)
struct timeval *wptr; struct timeval *wptr;
/* }}} */ /* }}} */
/* we wait up to 10 seconds if fail_on_error */ /* we wait up to 10 seconds if fail_on_error, forever otherwise */
wtime.tv_sec = 10; wtime.tv_sec = 10;
wtime.tv_usec = 0; wtime.tv_usec = 0;
wptr = fail_on_error ? &wtime : NULL;
for (wptr = fail_on_error ? &wtime : NULL;;) while (1) {
{
if (!subshell_alive) if (!subshell_alive)
return FALSE; return FALSE;
@ -1014,9 +1014,6 @@ static int feed_subshell (int how, int fail_on_error)
} }
/* }}} */ /* }}} */
/* From now on: block forever on the select call */
wptr = NULL;
if (FD_ISSET (subshell_pty, &read_set)) if (FD_ISSET (subshell_pty, &read_set))
/* {{{ Read from the subshell, write to stdout */ /* {{{ Read from the subshell, write to stdout */