detach(Port, Ref) -> ok

Port = mailbox()

Ref = attach_ref()

Remove attachment to an OSE process.

If a message for this monitor has been sent but not received
by the calling process, it is removed from the message queue.
Note that this only works of the same process
that did the attach does the detach.

The above will first listen for signals with numbers 1234 and 12345, and then
replace that with only listening to 1234 and 123456.

With the current implementation it is not possible to listen to all signal
numbers.

raises: badarg | enomem

open(Name) -> Port

Name = iodata()

Port = mailbox()

Create a mailbox with the given name and return a port that handles
the mailbox.

An OSE phantom process with the given name will be created that will send any
messages sent through this mailbox. Any messages sent to the new OSE process
will automatically be converted to an Erlang message and sent to the Erlang
process that calls this function. See listen/2 for details about the
format of the message sent.