diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-02-20 23:45:00 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-02-20 23:45:00 +0100 |
commit | fd575055c2215ce2ce42efaa82be53a94c7b3932 (patch) | |
tree | 80bb4ddf3264c30fc4ddc228fce4e379c2bcd18b /Userland/sh.cpp | |
parent | 0aaec6b19abf1e6e2a9bcc9eca201f45adbb797f (diff) | |
download | serenity-fd575055c2215ce2ce42efaa82be53a94c7b3932.zip |
Userland: /bin/sh shouldn't crash on EINTR.
Diffstat (limited to 'Userland/sh.cpp')
-rw-r--r-- | Userland/sh.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
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; |