1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:57:45 +00:00

Userland: /bin/sh shouldn't crash on EINTR.

This commit is contained in:
Andreas Kling 2019-02-20 23:45:00 +01:00
parent 0aaec6b19a
commit fd575055c2

View file

@ -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;