Are you saying that after the main process has exited, child processes can still run and write to stdout/stderr?
Callicles · 1h ago
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.
anp · 1h ago
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.
npalli · 36m ago
Fearless concurrency with Rust unless you are worried about lifecycle management, threads/co-operation and general ergonomics. Even modern c++ might be better at this (gasp!) with std::jthread
psyclobe · 23m ago
Heretic!
vlovich123 · 1h ago
Nothing here is specific to Rust and applies to any terminal app in any language that spawns a child process.
stonogo · 42m ago
Nothing, that is, except for the examples, the source code, the libraries, and the linked references. But nothing else.
windowshopping · 1h ago
This title was close to being a garden path sentence, but ultimately avoided it.
impish9208 · 22m ago
Yes, daemonized children must always be killed; preferably by the parent, but any reaper would also work.
oatsandsugar · 1m ago
Is that a forking path sentence? If so, whoosh.
abnercoimbre · 1h ago
Tell more about garden paths in this context, I'm curious!
xoxxala · 1h ago
I had no idea what a garden path sentence was, too, but wiki to the rescue:
I also long for a more misuse-resistant terminal but that seems like a bigger problem.
https://en.wikipedia.org/wiki/Garden-path_sentence
fruit flies like a banana.