What’s the best way to do OS process management from Erlang? I need to be able to spawn child OS processes, write to the child’s stdin, read from both stdout and stderr, send kill signals, and get notified of exit codes. I don’t see that this is possible with what’s in erts.
I know about erlexec, but I don’t know if it’s stable or if anyone is actually using it in anger. Are there any other options, or is that the best?
Port programs are the best way to do this. Port programs are safe and won’t harm the Erlang VM, and if they crash or mis-behave can be killed and restarted like any other Erlang process.
Port Drivers are different and if they mis-behave can bring down the entire Erlang VM.