Fixing Ctrl+C in Rust terminal apps: Child process management
1–10 of 62 posts
Re: Fixing Ctrl+C in Rust terminal apps: Child process management
#2This title was close to being a garden path sentence, but ultimately avoided it.
Re: Fixing Ctrl+C in Rust terminal apps: Child process management
#3This title was close to being a garden path sentence, but ultimately avoided it.
Tell more about garden paths in this context, I'm curious!
Re: Fixing Ctrl+C in Rust terminal apps: Child process management
#4This title was close to being a garden path sentence, but ultimately avoided it.
Tell more about garden paths in this context, I'm curious!
I had no idea what a garden path sentence was, too, but wiki to the rescue:
Re: Fixing Ctrl+C in Rust terminal apps: Child process management
#5I’ve definitely seen all of these problems in Rust programs but they certainly aren’t limited to Rust programs. I do think it would be nice if Rust libraries were a bit more misuse-resistant when it came to preserving a coherent terminal.
I also long for a more misuse-resistant terminal but that seems like a bigger problem.
Re: Fixing Ctrl+C in Rust terminal apps: Child process management
#6Are you saying that after the main process has exited, child processes can still run and write to stdout/stderr?
Re: Fixing Ctrl+C in Rust terminal apps: Child process management
#7Are you saying that after the main process has exited, child processes can still run and write to stdout/stderr?
I believe I am saying child processes can write to stdout as the main process is shutting down. Also, if the child processes are not shut down properly and are left dangling, and the child processes were set up as 'inherit' to be able to write directly to stdout/stderr then yes.
Re: Fixing Ctrl+C in Rust terminal apps: Child process management
#8Nothing here is specific to Rust and applies to any terminal app in any language that spawns a child process.