SIGKILL can block file descriptors from closing
Investigating orbital#21 (closed) and discussing on chat, it seems that there is in fact a kernel bug causing this, and it seems to work with some apps, not with others.
Reproduction
- login with enter
- open orbterm
- type "file_manager&" at the terminal prompt
- file manager window will open
- back at terminal type "ps" and note the PID of the file_manager
- at terminal type "kill 9 {PID}
- will see "pipeline execution error: process ({PID}) ended by SIGKILL
- type "ps" again, you will see that process no longer exists
- the window for file manager is still shown on the screen, you can try to close it etc but it is unresponsive
if you repeat the above with "calculator", all works as expected. Same with "orbterm".
Adding logging to the call to handle_window_close() in scheme.rs in Orbital, we see that:
- File Manager -> handle_window_close() is not called
- Calculator -> handle_window_close() is called
kernel::scheme::user:WARN -- Unaligned map size for context Some("/ui/bin/orbterm")
main path: file:/home/user
2023-03-28T14-24-47..004++00:00 [launcher@launcher:424 INFO] launcher: /ui/bin/file_manager (72) exited with signal: 9 (SIGKILL)
2023-03-28T14-25-09..926++00:00 [orbital@orbital::scheme:380 DEBUG] handle_window_close 7
2023-03-28T14-25-10..001++00:00 [launcher@launcher:424 INFO] launcher: /ui/bin/calculator (77) exited with signal: 9 (SIGKILL)