[erlang-questions] Executing external commands

Fernando Ipar fipar@REDACTED
Mon Feb 12 00:48:10 CET 2007

Hi all.

I'm looking for a way to run external commands in erlang and get it's 
exit code back to erlang.
As far as I understand, os:cmd(Command) only returns the output of 
running the program.

Is there a way to get the exit code from the command, or do I have to 
implement an external program to run these commands and communicate
back and forth with erlang through a port?

What I'm looking for is something like:

case ExitCode of
    0 ->
    _ ->

Thanks and regards,


More information about the erlang-questions mailing list