aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>2020-12-29 21:05:48 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>2020-12-29 21:05:48 +0000
commit3db1b221edab9bada79da4f825347ce1772f5ee8 (patch)
tree808835f2f25a03f12c301efecb45a81f2d9944fa /contrib
parentf53120073b321c1d2e42641ca22414992ddbe0ff (diff)
downloadsrc-3db1b221edab9bada79da4f825347ce1772f5ee8.tar.gz
src-3db1b221edab9bada79da4f825347ce1772f5ee8.zip
Set stdout & stderr unbuffered, so that the "telnet>" prompt
also shows up when output is redirected: telnet |& tee _log
Diffstat (limited to 'contrib')
-rw-r--r--contrib/telnet/telnet/main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/contrib/telnet/telnet/main.c b/contrib/telnet/telnet/main.c
index 8703968efe10..befb3eecee66 100644
--- a/contrib/telnet/telnet/main.c
+++ b/contrib/telnet/telnet/main.c
@@ -121,6 +121,8 @@ main(int argc, char *argv[])
extern int forward_flags;
#endif /* FORWARD */
+ setbuf(stdout, NULL);
+ setbuf(stderr, NULL);
tninit(); /* Clear out things */
TerminalSaveState();