Timeline for When closing a terminal emulator window, is the last file descriptor of a slave side or master side closed?
Current License: CC BY-SA 4.0
6 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jan 2, 2019 at 16:41 | vote | accept | Tim | ||
| Jan 2, 2019 at 9:46 | comment | added | 炸鱼薯条德里克 | Back to your question, closing that window (usually, if you're nit-picking, remember your question about closing window and terminating process?) causes(this logic happens in userspace) the terminal emulator process exit, which is holding the master pty fd, not the slave fd(at least non of the terminal emulator program I know). | |
| Jan 2, 2019 at 9:37 | comment | added | 炸鱼薯条德里克 | It can't have multiple slave side. Think it as a pipe, just a tube with two holes. And the window you see on screen doesn't have any direct relationship with pseudo-terminal devices. It's just the terminal-emulator program is rendering data from the pseudo-terminal devices to an X window (or Wayland window, or DRM device, whatever). | |
| Jan 2, 2019 at 8:49 | answer | added | user313992 | timeline score: 4 | |
| Jan 2, 2019 at 4:59 | comment | added | AlexP | The terminal emulator program has the master side of the pseudoterminal; when the terminal emulator program exits it can only close the master side. The slave side is open in the child process which runs the shell or whatever program runs in the terminal emulator. How could it be otherwise? Think of a real physical terminal: it has an outside and an inside. For a pseudoterminal, the "ouside" part is called the master and the "inside" part the slave. | |
| Jan 2, 2019 at 4:02 | history | asked | Tim | CC BY-SA 4.0 |