X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Flttv%2Fmodules%2Fgui%2Ftracecontrol%2Ftracecontrol.c;h=1407aa88bbd4850429f2e356c38af5a51b6b63dd;hb=75e2f3963d4718dd6a629b761966704f6443e597;hp=1193046d1feafbb17a58f72b741a0c42d8db3eef;hpb=6cec4cd266bde25f87dad0a059fd98c7381eb8c2;p=lttv.git diff --git a/ltt/branches/poly/lttv/modules/gui/tracecontrol/tracecontrol.c b/ltt/branches/poly/lttv/modules/gui/tracecontrol/tracecontrol.c index 1193046d..1407aa88 100644 --- a/ltt/branches/poly/lttv/modules/gui/tracecontrol/tracecontrol.c +++ b/ltt/branches/poly/lttv/modules/gui/tracecontrol/tracecontrol.c @@ -435,9 +435,10 @@ static int execute_command(const gchar *command, const gchar *username, /* Read the output from the child terminal before the prompt. If no data in * 200 ms, we stop reading to give the password */ g_info("Reading from child console..."); + sleep(1); /* make sure the child is ready */ while(1) { pollfd.fd = fdpty; - pollfd.events = POLLIN|POLLPRI; + pollfd.events = POLLIN|POLLPRI|POLLERR|POLLHUP|POLLNVAL; num_rdy = poll(&pollfd, 1, 200); #if 0 @@ -495,7 +496,7 @@ static int execute_command(const gchar *command, const gchar *username, while(1) { int num_hup = 0; pollfd.fd = fdpty; - pollfd.events = POLLIN|POLLPRI; + pollfd.events = POLLIN|POLLPRI|POLLERR|POLLHUP|POLLNVAL; num_rdy = poll(&pollfd, 1, -1); #if 0