Timeline for Why does closing terminal emulator window terminate a bash process with SIGHUP trap changed not to terminate?
Current License: CC BY-SA 4.0
10 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Mar 4, 2020 at 18:17 | history | edited | user313992 | CC BY-SA 4.0 | fix link |
| Feb 27, 2019 at 20:07 | history | edited | user313992 | CC BY-SA 4.0 | add link to bash sources |
| Jan 2, 2019 at 6:39 | comment | added | user313992 | other terminal emulators like mlterm or lxterminal will just close the pty, which will cause the kernel to send a SIGHUP; but even if the shell running in the pty ignores or handles that sig, it will die with EIO errors when trying to read from, write to or do termios ioctls on the slave part of a pty with no master. | |
| Jan 2, 2019 at 6:18 | comment | added | user313992 | 1. readline may be a shared lib, but on my system bash is linked statically to its own version of it 2. that's what xterm does when the user tries to close the window -- it sends a SIGHUP itself to process group of the terminal, and it won't actually destroy the window and the pty until the process started in it exits of its own volition. | |
| Jan 2, 2019 at 4:09 | comment | added | Tim | Is closing a terminal window an event which can generate SIGHUP? If that were true, how can setting up SIGHUP handler prevent the terminal window from closing, given that the terminal window is already closed? | |
| Jan 2, 2019 at 4:03 | vote | accept | Tim | ||
| Jan 2, 2019 at 2:31 | comment | added | Tim | Thanks. Is readline library a shared library? Does bash dynamically linked to it or dynamically load it by dlopen()? | |
| Dec 30, 2018 at 23:34 | history | edited | user313992 | CC BY-SA 4.0 | be more clear that this is not about the trivial case where the pty is destroyed and the shell exits because of EIO |
| Dec 30, 2018 at 22:33 | history | edited | user313992 | CC BY-SA 4.0 | use a sleep+bg instead of setsid; start an explanation about readline |
| Dec 30, 2018 at 20:31 | history | answered | user313992 | CC BY-SA 4.0 |