[Twisted-Python] Opening a fifo
Paul Thomas
pthomas at spongelava.com
Mon Nov 17 12:11:56 MST 2008
On 14 Nov 2008, at 11:39, Paul Thomas wrote:
>
> On 14 Nov 2008, at 11:00, Phil Mayers wrote:
>
>> Paul Thomas wrote:
>>> 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.
>>>>
>>
[snip]
>>>> fd = os.open('thefifo', os.O_RDWR)
>>>>
>>>> ...will return immediately,
>>>>
[snip]
> I'll have to wait til Monday to try it out again. I thought the
> problem was to do with the other process opening the read end
> between the open and the write. But maybe it was a case of not
> testing what I thought I was testing.
This works just fine:
fd = os.open('thefifo', os.O_RDWR | os.O_NONBLOCK)
thanks for your help.
Paul.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20081117/b2f0bce0/attachment.html>
More information about the Twisted-Python
mailing list