Reputation: 420
I want to execute a (slow) python script and I want my Elixir process to block until it's receives all the output from the script.
Are either Elixir's System.cmd/3 or Erlang's os:cmd/1 guaranteed to be synchronous? If not, is there some other way to make a synchronous os call?
Upvotes: 5
Views: 1454
Reputation: 10252
Executes Command in a command shell of the target OS, captures the standard output of the command and returns this result as a string. This function is a replacement of the previous unix:cmd/1; on a Unix platform they are equivalent.
This command is synchronous .
Upvotes: 7