From 36fed020ae85342fe87750d37093584e584481a8 Mon Sep 17 00:00:00 2001 From: An-Cheng Huang Date: Sat, 14 May 2011 00:33:00 +0800 Subject: minor changes * remove warning. * make output more responsive. --- src/cli_new.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/cli_new.c b/src/cli_new.c index be1264a..2cb0c03 100644 --- a/src/cli_new.c +++ b/src/cli_new.c @@ -961,7 +961,7 @@ static int change_var_value(const char* var_reference,const char* value, int act return ret; } -int system_out(const char *command, const char *prepend_msg, boolean format); +int system_out(char *command, const char *prepend_msg, boolean eloc); /**************************************************** check_syn: @@ -2104,7 +2104,7 @@ restore_output() } int -system_out(const char *cmd, const char *prepend_msg, boolean eloc) +system_out(char *cmd, const char *prepend_msg, boolean eloc) { int pfd[2]; int ret; @@ -2274,6 +2274,7 @@ system_out(const char *cmd, const char *prepend_msg, boolean eloc) if (fwrite(out, count, 1, out_stream) != 1) { return -1; } + fflush(out_stream); } else if (sret == 0) { /* timeout */ if (waitpid(cpid, &status, WNOHANG) == cpid) { -- cgit v1.2.3