aboutsummaryrefslogtreecommitdiff
path: root/libbb/lineedit.c
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2014-12-14 14:20:56 +0000
committerRon Yorston <rmy@pobox.com>2014-12-14 14:20:56 +0000
commit6d6d18d45c145899fce3a39553771cf0af671f30 (patch)
tree1936d18cbf61b9e0989464aad0a11c52cbeff7b7 /libbb/lineedit.c
parent0c204dc07b718244c360e0b84df66ce0a012e14f (diff)
parentacb8be721768b54075a51d1859d390904a0f1f6c (diff)
downloadbusybox-w32-6d6d18d45c145899fce3a39553771cf0af671f30.tar.gz
busybox-w32-6d6d18d45c145899fce3a39553771cf0af671f30.tar.bz2
busybox-w32-6d6d18d45c145899fce3a39553771cf0af671f30.zip
Merge branch 'busybox' into merge
Conflicts: archival/libarchive/open_transformer.c libbb/lineedit.c miscutils/man.c
Diffstat (limited to 'libbb/lineedit.c')
-rw-r--r--libbb/lineedit.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libbb/lineedit.c b/libbb/lineedit.c
index 1f5653cb5..3d96a8e9f 100644
--- a/libbb/lineedit.c
+++ b/libbb/lineedit.c
@@ -2316,10 +2316,14 @@ int FAST_FUNC read_line_input(line_input_t *st, const char *prompt, char *comman
2316 if (!isatty(0) || !isatty(1)) { 2316 if (!isatty(0) || !isatty(1)) {
2317#else 2317#else
2318 if (tcgetattr(STDIN_FILENO, &initial_settings) < 0 2318 if (tcgetattr(STDIN_FILENO, &initial_settings) < 0
2319 || !(initial_settings.c_lflag & ECHO) 2319 || (initial_settings.c_lflag & (ECHO|ICANON)) == ICANON
2320 ) { 2320 ) {
2321#endif 2321#endif
2322 /* Happens when e.g. stty -echo was run before */ 2322 /* Happens when e.g. stty -echo was run before.
2323 * But if ICANON is not set, we don't come here.
2324 * (example: interactive python ^Z-backgrounded,
2325 * tty is still in "raw mode").
2326 */
2323 parse_and_put_prompt(prompt); 2327 parse_and_put_prompt(prompt);
2324 /* fflush_all(); - done by parse_and_put_prompt */ 2328 /* fflush_all(); - done by parse_and_put_prompt */
2325 if (fgets(command, maxsize, stdin) == NULL) 2329 if (fgets(command, maxsize, stdin) == NULL)