Open oconnor663 opened 4 years ago
Actually, it would probably be better for both to use a background thread to wait. Maybe we could avoid the implicit killing entirely.
Would it make sense to take a similar approach to partially started pipelines? Killing processes is gross. We could spawn a background thread to wait for the left half to exit on its own, which should be prompt in the vast majority of cases because of SIGPIPE or similar. (Or do nothing on Windows as an optimization, since zombies aren't a concern there, but probably no one cares about the thread.)
The latter kills on drop, the former doesn't. That seems like a pretty bad inconsistency. Maybe
Handle
should kill on drop too?