[Twisted-Python] Opening a fifo

Paul Thomas pthomas at spongelava.com
Fri Nov 14 04:52:27 EST 2008

On 14 Nov 2008, at 09:47, Phil Mayers wrote:

> Paul Thomas wrote:
>> Hi,
>> I've run into a small problem where my twisted application needs to  
>> open a fifo to talk to another process. On Linux at least, the open  
>> blocks until the other end of the fifo is opened and this is  
>> blocking my reactor.
> Either of:
> fd = os.open('thefifo', os.O_RDONLY | os.O_NONBLOCK)
> fd = os.open('thefifo', os.O_RDWR)
> ...will return immediately,
> Try "man fifo" for a description of the vagaries.

I've tried RDWR and I get errors in writing. I really need O_WRONLY,  
and that fails with O_NONBLOCK unless the other end is open. Maybe  
I'll chase down the RDWR problem again.


More information about the Twisted-Python mailing list