From fd575055c2215ce2ce42efaa82be53a94c7b3932 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Wed, 20 Feb 2019 23:45:00 +0100 Subject: Userland: /bin/sh shouldn't crash on EINTR. --- Userland/sh.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Userland/sh.cpp') diff --git a/Userland/sh.cpp b/Userland/sh.cpp index 0cd80c8628..441dcbd798 100644 --- a/Userland/sh.cpp +++ b/Userland/sh.cpp @@ -415,9 +415,10 @@ int main(int argc, char** argv) return 0; if (nread < 0) { if (errno == EINTR) { - ASSERT(g->was_interrupted); - if (linedx != 0) - printf("^C"); + if (g->was_interrupted) { + if (linedx != 0) + printf("^C"); + } g->was_interrupted = false; linebuf[0] = '\0'; linedx = 0; -- cgit v1.2.3