Spawning processes on host OS with unix:cmd/1

Rick Pettit rpettit@REDACTED
Fri Dec 7 20:53:43 CET 2001


I would like to code an erlang process to start various UNIX processes and
keep them running.  I can start these processes with unix:cmd/1, but the
return value is the stdout of the shell command, and I am interested in
the pid.

I would rather not have to start the command and then look at ps(1) output
to get the pid, as that can be error prone and won't work if multiple
instances of the same executable are running and I need to differentiate
between them.

Is there a way to start a UNIX process from Erlang and get the pid?

Rick




More information about the erlang-questions mailing list