fix hang when we get EOF, #121376 from Laurent Vivier

2003-09-24  Havoc Pennington  <hp@pobox.com>

	* src/session.c (io_from_warning_dialog): fix hang when we get
	EOF, #121376 from Laurent Vivier
This commit is contained in:
Havoc Pennington 2003-09-25 01:50:30 +00:00 committed by Havoc Pennington
parent 99c7dc8b85
commit 28fbdc611e
2 changed files with 19 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2003-09-24 Havoc Pennington <hp@pobox.com>
* src/session.c (io_from_warning_dialog): fix hang when we get
EOF, #121376 from Laurent Vivier
2003-09-22 Taneem Ahmed <taneem@bengalinux.org>
* configure.in: Added "bn" to ALL_LINGUAS.

View File

@ -1815,6 +1815,20 @@ io_from_warning_dialog (GIOChannel *channel,
/* Remove the callback, freeing data */
return FALSE;
}
else if (condition & G_IO_IN)
{
/* Check for EOF */
char buf[16];
int ret;
ret = read (d->child_pipe, buf, sizeof (buf));
if (ret == 0)
{
finish_interact (d->shutdown);
return FALSE;
}
}
/* Keep callback installed */
return TRUE;