From aed5ec9314335394c84eb96309a844814f23aaaf Mon Sep 17 00:00:00 2001 From: Tyler Lanphear Date: Thu, 24 Dec 2020 22:24:55 -0500 Subject: [PATCH] LibC: Further stub out tcflow() POSIX says we can set errno EINVAL and return -1 if the action is not supported. This is better than crashing, and fixes bash crashing whenever you press ^C. --- Libraries/LibC/termios.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Libraries/LibC/termios.cpp b/Libraries/LibC/termios.cpp index 1ccd5cb6533..1037b0ab617 100644 --- a/Libraries/LibC/termios.cpp +++ b/Libraries/LibC/termios.cpp @@ -53,7 +53,8 @@ int tcsetattr(int fd, int optional_actions, const struct termios* t) int tcflow([[maybe_unused]] int fd, [[maybe_unused]] int action) { - ASSERT_NOT_REACHED(); + errno = EINVAL; + return -1; } int tcflush(int fd, int queue_selector)