X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=lttv%2Fmodules%2Fgui%2Ftracecontrol%2Ftracecontrol.c;h=283674b726650428a6ffc1d66f4db1bd51173617;hb=667dfdfea7441f2b7cf0d36f6ac7965b27dc768d;hp=28e665567baf7374310868c7c8d9212091ba3e91;hpb=f61f4dca50e13aa52b1ca3941c8f420848f4353f;p=lttv.git diff --git a/lttv/modules/gui/tracecontrol/tracecontrol.c b/lttv/modules/gui/tracecontrol/tracecontrol.c index 28e66556..283674b7 100644 --- a/lttv/modules/gui/tracecontrol/tracecontrol.c +++ b/lttv/modules/gui/tracecontrol/tracecontrol.c @@ -513,56 +513,61 @@ static int execute_command(const gchar *command, const gchar *username, /* Timeout : Stop waiting for chars */ if(num_rdy == 0) goto wait_child; - switch(pollfd.revents) { - case POLLERR: + /* Check for fatal errors */ + if(pollfd.revents & POLLERR) { g_warning("Error returned in polling fd\n"); num_hup++; - break; - case POLLHUP: - g_info("Polling FD : hung up."); - num_hup++; - break; - case POLLNVAL: - g_warning("Polling fd tells it is not open"); - num_hup++; - break; - case POLLPRI: - case POLLIN: - count = read (fdpty, buf, 256); - if(count > 0) { - unsigned int i; - buf[count] = '\0'; - g_printf("%s", buf); - for(i=0; i 0) { + unsigned int i; + buf[count] = '\0'; + g_printf("%s", buf); + for(i=0; i 0) { - g_warning("Child hung up too fast"); + g_warning("Child hung up without returning a full reply"); goto wait_child; } }