mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:58:12 +00:00
Let the slave PTY keep the master PTY alive.
This ownership model is a bit confusing. There's a retain cycle between MasterPTY and SlavePTY, but it's broken when the SlavePTY is closed, meaning that there are no more FileDescriptors referring to it.
This commit is contained in:
parent
45fba60ab5
commit
2b4374d08e
4 changed files with 7 additions and 4 deletions
|
@ -87,6 +87,7 @@ int main(int, char**)
|
|||
int nfds = select(max(ptm_fd, event_fd) + 1, &rfds, nullptr, nullptr, nullptr);
|
||||
if (nfds < 0) {
|
||||
dbgprintf("Terminal(%u) select() failed :( errno=%d\n", getpid(), errno);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (FD_ISSET(ptm_fd, &rfds)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue