mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-04 08:36:12 +00:00
Kernel: Reading from a slave PTY should give EOF if master PTY is closed.
This commit is contained in:
parent
3accdb0e93
commit
378e20c535
Notes:
sideshowbarker
2024-07-19 15:51:29 +09:00
Author: https://github.com/awesomekling
Commit: 378e20c535
5 changed files with 35 additions and 7 deletions
|
@ -410,6 +410,8 @@ int main(int argc, char** argv)
|
|||
for (;;) {
|
||||
char keybuf[16];
|
||||
ssize_t nread = read(0, keybuf, sizeof(keybuf));
|
||||
if (nread == 0)
|
||||
return 0;
|
||||
if (nread < 0) {
|
||||
if (errno == EINTR) {
|
||||
ASSERT(g->was_interrupted);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue