superfly / flyctl

Command line tools for fly.io services
https://fly.io
Apache License 2.0
1.36k stars 224 forks source link

Abort proxy when stdin gets closed #3638

Closed jonatanklosko closed 1 week ago

jonatanklosko commented 3 weeks ago

There is no guarantee that a OS process spawning fly proxy ... will terminate it, however the stdin is always closed when the parent terminates. In order to avoid zombie processes, we can watch stdin and when it gets closed we terminate the program. The original motivation is spawning fly proxy from Erlang VM.

For more context see a similar PR on esbuild: https://github.com/evanw/esbuild/pull/1449.

jonatanklosko commented 2 weeks ago

Kindly ping :)

dangra commented 1 week ago

Good stuff @jonatanklosko . thanks :)

jonatanklosko commented 1 week ago

Fantastic, thanks for the help!