Non blocking mode for port ?

. zist <>
Mon Apr 8 16:28:50 CEST 2002


How is it possible to change a port to non-blocking mode ?

I'm using a port as a named pipe/fifo for communication
towards an external process

  Port = open_port(fifo,[eof,out])

If the remote process dies, the erlang program stays
blocked in the send/port_command operation
so obviously ports are by default in blocking mode.

In C, I would use the O_NONBLOCK flag (when opening the fifo
or later on with fcntl), and then instead of staying blocked
on the write operation, the process would receive a SIGPIPE
signal on failure of the remote process.

Thanks,
Christophe Lesourd
InSerTO

_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com




More information about the erlang-questions mailing list