Live data from Hacker News

Fixing Ctrl+C in Rust terminal apps: Child process management

fiveonefour.com

1–10 of 62 posts

Re: Fixing Ctrl+C in Rust terminal apps: Child process management

#4

This 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:

https://en.wikipedia.org/wiki/Garden-path_sentence

Re: Fixing Ctrl+C in Rust terminal apps: Child process management

#5
I’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

#7

Are 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

#9
post #4

Earlier quoted context omitted.

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: https://en.wikipedia.org/wiki/Garden-path_sentence

The old man the boat

Re: Fixing Ctrl+C in Rust terminal apps: Child process management

#10
post #4

Earlier quoted context omitted.

I had no idea what a garden path sentence was, too, but wiki to the rescue: https://en.wikipedia.org/wiki/Garden-path_sentence

The old man the boat

Time flies like an arrow,

fruit flies like a banana.

Post reply on HN