mirror of
https://github.com/darlinghq/darling.git
synced 2024-11-23 20:29:47 +00:00
Fix 100% CPU on dead SSH sessions with 'darling shell'
This commit is contained in:
parent
a9cb3b9f7b
commit
f7b18e30be
@ -409,6 +409,8 @@ static void shellLoop(int sockfd, int master)
|
||||
rd = read(STDIN_FILENO, buf, sizeof(buf));
|
||||
if (rd > 0)
|
||||
write(master, buf, rd);
|
||||
else
|
||||
exit(1);
|
||||
}
|
||||
while (rd == sizeof(buf));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user