In article <5d4c612404061616185967e8c6 / mail.gmail.com>, Lennon Day-Reynolds <rcoder / gmail.com> wrote: >In C, you'd use something like this: > >| fcntl(fd, F_SETFL, >| fcntl(fd, F_GETFL) & >| ~O_NONBLOCK); > Hmmm... are you sure about that negated O_NONBLOCK (~O_NONBLOCK)? I'm not sure what those constants are defined as in the respective .h file, but depending on what they are that may not work (and may not work 'badly' :-). >In Ruby, the following: > >| require 'io/nonblock' >| fh = open('/tmp/myfifo') >| fh.nonblock = false > >..which just hides the fcntl call and nasty constants in a nicer >interface. On my test machine, though, it looks like the FIFO opens in >blocking mode by default, at least if opened for writing. > >Any of that help? I'll take a look at io/nonblock, but right now I think I actually need two FIFOs. (BTW: This is something I'm converting from Windows C code - apparently they allow bidirectional pipes on Windows). Phil