Skip to content

Instantly share code, notes, and snippets.

@samuell
Last active November 26, 2015 23:29
Show Gist options
  • Save samuell/92ac1e74c671aeb17b96 to your computer and use it in GitHub Desktop.
Save samuell/92ac1e74c671aeb17b96 to your computer and use it in GitHub Desktop.
defmodule Exmultiproc do
for _ <- 1..500 do
cmd = "sleep 3600"
IO.puts "Starting another process ..."
Port.open({:spawn, cmd}, [:exit_status, :stderr_to_stdout])
end
System.cmd("sleep", ["3600"])
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment