summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2008-11-21 13:05:12 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2008-11-21 13:05:12 +0100
commit661ec5db7fa047d883997d0b2cbdd71659f80777 (patch)
tree76a219d5e394895f02a27942ec6227010bf0da7e /client
parenteac21b46f7cf0f704c976f2ffdb289837ad100cc (diff)
downloadbird-661ec5db7fa047d883997d0b2cbdd71659f80777.tar
bird-661ec5db7fa047d883997d0b2cbdd71659f80777.zip
I am not sure whether this is proper fix for a problem that birdc
shows only parts of larger outputs (for example 'show route all'). It seems that birdc reads (from bird) and writes (to stdout) everything but during execution of some readline code some already written output disappeared (although it is fflush()ed and tcdrain()ed). As birdc reads from stdin when select said there are some data, O_NONBLOCK for stdin is unnecessary and when it is removed, i didn't notified this problem.
Diffstat (limited to 'client')
-rw-r--r--client/client.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/client/client.c b/client/client.c
index 905526a..ce9bdb6 100644
--- a/client/client.c
+++ b/client/client.c
@@ -201,8 +201,9 @@ input_init(void)
rl_add_defun("bird-help", input_help, '?');
rl_callback_handler_install("bird> ", got_line);
input_initialized = 1;
- if (fcntl(0, F_SETFL, O_NONBLOCK) < 0)
- die("fcntl: %m");
+// readline library does strange things when stdin is nonblocking.
+// if (fcntl(0, F_SETFL, O_NONBLOCK) < 0)
+// die("fcntl: %m");
}
static void