mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 08:27:45 +00:00
Userland: /bin/sh shouldn't crash on EINTR.
This commit is contained in:
parent
0aaec6b19a
commit
fd575055c2
1 changed files with 4 additions and 3 deletions
|
@ -415,9 +415,10 @@ int main(int argc, char** argv)
|
||||||
return 0;
|
return 0;
|
||||||
if (nread < 0) {
|
if (nread < 0) {
|
||||||
if (errno == EINTR) {
|
if (errno == EINTR) {
|
||||||
ASSERT(g->was_interrupted);
|
if (g->was_interrupted) {
|
||||||
if (linedx != 0)
|
if (linedx != 0)
|
||||||
printf("^C");
|
printf("^C");
|
||||||
|
}
|
||||||
g->was_interrupted = false;
|
g->was_interrupted = false;
|
||||||
linebuf[0] = '\0';
|
linebuf[0] = '\0';
|
||||||
linedx = 0;
|
linedx = 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue