exos v1.0.2 Exos.Proc
Link to this section Summary
Functions
Launch a GenServer which starts a port and proxify cast and call to
it using a port protocol with packet: 4, (32bits-length+data)
messages are transmitted throught stdin/out. Input terms are
encoded using binary_to_term and received terms are decoded using
term_to_binary
Link to this section Functions
Link to this function
start_link(cmd, init, opts \\ [], link_opts \\ [], event_manager \\ nil)
Launch a GenServer which starts a port and proxify cast and call to
it using a port protocol with packet: 4, (32bits-length+data)
messages are transmitted throught stdin/out. Input terms are
encoded using binary_to_term and received terms are decoded using
term_to_binary.
cmdis the shell command to launch the port- when the port starts, it automatically receives as first message the
initterm ifinit !== :no_init optsare options forPort.open(for instance[cd: "/path/"])link_optsare options forGenServer.start_link(for instance[name: :servername])- messages received from the port outside of a
GenServer.callcontext are sent to theevent_managerGenEvent if it is notnil - to allow easy supervision, if the port die with a return code == 0, then
the GenServer die with the reason
:normal, else with the reason:port_terminated