Author schmir
Recipients aioryi, draghuram, schmir
Date 2008-06-06.09:43:10
SpamBayes Score 0.138298
Marked as misclassified No
Message-id <1212745398.82.0.654764504969.issue3002@psf.upfronthosting.co.za>
In-reply-to
Content
The open('fifo', 'rb') already blocks. One has to use os.fdopen with
O_NONBLOCK to prevent blocking.

fd=os.open('fifo', os.O_RDONLY | os.O_NONBLOCK)

and then use

stat.S_ISFIFO(os.fstat(fd).st_mode)

to check if this is a fifo.
Checking with os.stat before opening with open will result in a race
condition.
History
Date User Action Args
2008-06-06 09:43:19schmirsetspambayes_score: 0.138298 -> 0.138298
recipients: + schmir, draghuram, aioryi
2008-06-06 09:43:18schmirsetspambayes_score: 0.138298 -> 0.138298
messageid: <1212745398.82.0.654764504969.issue3002@psf.upfronthosting.co.za>
2008-06-06 09:43:17schmirlinkissue3002 messages
2008-06-06 09:43:15schmircreate