Kaydet (Commit) 15d67052 authored tarafından Lex Trotman's avatar Lex Trotman

Fix infinite loop reading build command output

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4949 ea778897-0a13-0410-b9d1-a72fbfd435f5
üst 15332299
2010-05-23 Lex Trotman <elextr.at.gmail.dot.com>
* src/build.c:
Fix infinite loop reading build command output
2010-05-23 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* src/msgwindow.c:
......
......@@ -1014,14 +1014,16 @@ static gboolean build_iofunc(GIOChannel *ioc, GIOCondition cond, gpointer data)
if (cond & (G_IO_IN | G_IO_PRI))
{
gchar *msg;
GIOStatus st;
while (g_io_channel_read_line(ioc, &msg, NULL, NULL, NULL) && msg)
while ((st = g_io_channel_read_line(ioc, &msg, NULL, NULL, NULL)) == G_IO_STATUS_NORMAL && msg)
{
gint color = (GPOINTER_TO_INT(data)) ? COLOR_DARK_RED : COLOR_BLACK;
process_build_output_line(msg, color);
g_free(msg);
}
if (st == G_IO_STATUS_ERROR || st == G_IO_STATUS_EOF) return FALSE;
}
if (cond & (G_IO_ERR | G_IO_HUP | G_IO_NVAL))
return FALSE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment