saleyn / erlexec

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

Close stdin by eof after consuming stdin_queue #166

Closed ushitora-anqou closed 2 years ago

ushitora-anqou commented 2 years ago

In my understanding, the current erlexec throws away the queued inputs in stdin_queue and closes stdin immediately after eof comes. However, the library user sent eof to the erlexec's process after he/she sent the queued inputs. Therefore, I believe stdin should be closed after all the queued inputs are consumed. I implemented this behavior in this PR.