Port.monitor

You're seeing just the function monitor, go back to Port module for more information.
Link to this function

monitor(port)

View Source (since 1.6.0)

Specs

monitor(port() | {name, node()} | name) :: reference() when name: atom()

Starts monitoring the given port from the calling process.

Once the monitored port process dies, a message is delivered to the monitoring process in the shape of:

{:DOWN, ref, :port, object, reason}

where:

  • ref is a monitor reference returned by this function;
  • object is either the port being monitored (when monitoring by port ID) or {name, node} (when monitoring by a port name);
  • reason is the exit reason.

See :erlang.monitor/2 for more information.

Inlined by the compiler.