saleyn / erlexec

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

Need a way to ensure a process is dead #33

Closed davidw closed 10 years ago

davidw commented 10 years ago

I need some kind of call so that I can ensure that when it returns, or sends me a message or something, the underlying process is really and truly dead.

Since I'm calling this from terminate() of a gen_server, I think something that just plain blocks is probably what I'm after.

davidw commented 10 years ago

This can be done via the monitor flag, it seems. Perhaps wrapping it up in a command would be convenient.... I'll have a look.

davidw commented 10 years ago

I created a stop_and_wait command here:

https://github.com/davidw/erlexec/commit/ff2d12ccf56745c85dcd7c202d39b701423a1a88

davidw commented 10 years ago

I fixed this slightly in another, subsequent commit:

https://github.com/davidw/erlexec/commit/7967a9b4356bf598611fa0c908d581e1036b07aa

davidw commented 10 years ago

Merged.