From: Paul Lutus Date: 2006-11-17T20:05:06+09:00 Subject: Re: Reading from a named pipe Gc3bcnther Gruber wrote: > Hi all, > > I need to read some text from a named pipe in ruby. The writing is done > in another (C++) program and I'd like to have Ruby display what is sent. > > I've looked at the IO.pipe function, but there seems to be no way to get > a NAMED pipe. Named pipes are opened and read or written as though they were files (streams). Just open it by path and name. > The two programs are running under Windows XP, btw. Are you asking how to create the named pipe? That is an operating system function, and frankly, I don't know if Windows supports them. The operating system must support the idea of a named pipe, and if it doesn't, no named pipe. > Are named pipes even supported in Ruby? As inputs and outputs, yes. This can be said of any language that opens and reads/writes streams. But the pipe itself must be supported and created by the OS. > How can I read from one? Open it like a file. -- Paul Lutus http://www.arachnoid.com