saleyn / erlexec

Execute and control OS processes from Erlang/OTP
https://hexdocs.pm/erlexec/readme.html
Other
541 stars 141 forks source link

Closing stdin #67

Closed gar1t closed 8 years ago

gar1t commented 8 years ago

Lots of apps wait for stdin to be closed as an indication it's time to do something meaningful (like exit). Without the ability to close stdin, one needs to create an intermediary wrapper that knows uses some inbound signal to close stdin (e.g. two \n, EOF, etc.)

The test example conveniently reads one line and exits.

A trivial example is to use write to cat's stdin.

saleyn commented 8 years ago

If you need to close stdin, pass the option: {stdin, null} or {stdin, close}. See http://saleyn.github.io/erlexec/exec.html

gar1t commented 8 years ago

Ack - I completely missed the manage function!