named pipe as port?

Heinz Eriksson heinz@REDACTED
Wed Jul 25 01:38:55 CEST 2001


I open a named pipe/fifo, created with mkfifo, as a port
and that seems to work ok.

   Fifo = open_port(fifo, [eof]).

It is also works to open more than one fifo as port
and handle receive from them in parallel. 


However, documentation for open_port tells me:

"Atom
 This use of open_port() is obsolete and will be removed
 in a future version of Erlang. Use the file module instead."

But if I try to open the fifo with Fifo = file:open("fifo",[])
I get 
   {error,eisdir}

Is there a correct way to connect to a fifo?


/hz


______________________________________________________
Get Your FREE FlashMail Address now at http://www.flashmail.com
It's Free, Easy, & Fun !!!



More information about the erlang-questions mailing list