named pipe as port?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

named pipe as port?

Heinz Nikolaus Gies

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 !!!