Skip to content

Instantly share code, notes, and snippets.

@Licenser
Created March 11, 2015 15:31
Show Gist options
  • Save Licenser/41a7ffe5ca52f57a169c to your computer and use it in GitHub Desktop.
Save Licenser/41a7ffe5ca52f57a169c to your computer and use it in GitHub Desktop.
-module(arg).
-export([run/1]).
-define(BIN, "/bin/cat").
loop(Port) ->
erlang:port_info(Port),
loop(Port).
run(N) ->
[spawn(fun () -> loop(open_port({spawn, ?BIN}, [binary])) end) || _ <- lists:seq(1, N)].
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment