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.
This commit is contained in:
parent
eac21b46f7
commit
661ec5db7f
1 changed files with 3 additions and 2 deletions
|
@ -201,8 +201,9 @@ input_init(void)
|
||||||
rl_add_defun("bird-help", input_help, '?');
|
rl_add_defun("bird-help", input_help, '?');
|
||||||
rl_callback_handler_install("bird> ", got_line);
|
rl_callback_handler_install("bird> ", got_line);
|
||||||
input_initialized = 1;
|
input_initialized = 1;
|
||||||
if (fcntl(0, F_SETFL, O_NONBLOCK) < 0)
|
// readline library does strange things when stdin is nonblocking.
|
||||||
die("fcntl: %m");
|
// if (fcntl(0, F_SETFL, O_NONBLOCK) < 0)
|
||||||
|
// die("fcntl: %m");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in a new issue