From d9dc1ff69849f8c299bd1d7b4477aacdc2c890cc Mon Sep 17 00:00:00 2001 From: HiFiPhile Date: Thu, 14 Sep 2023 00:06:46 +0200 Subject: [PATCH] tty_stdin_input_thread(): write to pipe only if byte_count > 0. --- src/tty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tty.c b/src/tty.c index 5308c67..d6a38ed 100644 --- a/src/tty.c +++ b/src/tty.c @@ -349,7 +349,7 @@ void *tty_stdin_input_thread(void *arg) } // Write all bytes read to pipe - while (byte_count) + while (byte_count > 0) { bytes_written = write(pipefd[1], input_buffer, byte_count); if (bytes_written < 0)