Re: [Haskell-cafe] I/O system brokenness with named pipes

2008-07-05 Thread matth
On Fri, Apr 11, 2008 at 12:39:54PM +0200, Duncan Coutts wrote: > > On Thu, 2008-04-10 at 20:34 -0500, John Goerzen wrote: > > > I have created the named pipe from Haskell no problem. > > > > But I can't use writeFile to write data to it. Worse, it returns: > > > > *** Exception: /tmp/bakroller

Re: [Haskell-cafe] I/O system brokenness with named pipes

2008-04-11 Thread Donn Cave
On Apr 11, 2008, at 6:15 AM, John Goerzen wrote: I wonder if we could document this behavior. I rarely use non- blocking I/O from C, and Haskell hides the fact that it's doing this, so the behavior is non-intuitive. I have run into this problem, with Network.Socket (socket). If I remem

Re: [Haskell-cafe] I/O system brokenness with named pipes

2008-04-11 Thread Brandon S. Allbery KF8NH
On Apr 11, 2008, at 9:08 , John Goerzen wrote: On Fri April 11 2008 8:02:07 am Brandon S. Allbery KF8NH wrote: On Apr 11, 2008, at 8:12 , John Goerzen wrote: OK, I have referred to fifo(7) regarding this point. It seems I may need a loop trying over and over to open the FIFO in write mode. I

Re: [Haskell-cafe] I/O system brokenness with named pipes

2008-04-11 Thread John Goerzen
On Fri April 11 2008 7:53:12 am Brandon S. Allbery KF8NH wrote: > On Apr 11, 2008, at 6:33 , Don Stewart wrote: > >> But I can't use writeFile to write data to it. Worse, it returns: > >> > >> *** Exception: /tmp/bakroller.zD0xHj/fifo: openFile: does not exist > >> (No such device or address)

Re: [Haskell-cafe] I/O system brokenness with named pipes

2008-04-11 Thread John Goerzen
On Fri April 11 2008 8:02:07 am Brandon S. Allbery KF8NH wrote: > On Apr 11, 2008, at 8:12 , John Goerzen wrote: > > OK, I have referred to fifo(7) regarding this point. It seems I > > may need a > > loop trying over and over to open the FIFO in write mode. It also > > appears > > that ReadWriteM

Re: [Haskell-cafe] I/O system brokenness with named pipes

2008-04-11 Thread Brandon S. Allbery KF8NH
On Apr 11, 2008, at 8:12 , John Goerzen wrote: OK, I have referred to fifo(7) regarding this point. It seems I may need a loop trying over and over to open the FIFO in write mode. It also appears that ReadWriteMode appearing to work is Linux-specific, and this behavior is left undefined

Re: [Haskell-cafe] I/O system brokenness with named pipes

2008-04-11 Thread Brandon S. Allbery KF8NH
On Apr 11, 2008, at 6:33 , Don Stewart wrote: But I can't use writeFile to write data to it. Worse, it returns: *** Exception: /tmp/bakroller.zD0xHj/fifo: openFile: does not exist (No such device or address) Hmm, I can get this to work, but only if I have another process waiting on th

Re: [Haskell-cafe] I/O system brokenness with named pipes

2008-04-11 Thread John Goerzen
On Friday 11 April 2008 05:39:54 am Duncan Coutts wrote: > On Thu, 2008-04-10 at 20:34 -0500, John Goerzen wrote: > > I have created the named pipe from Haskell no problem. > > > > But I can't use writeFile to write data to it. Worse, it returns: > > > > *** Exception: /tmp/bakroller.zD0xHj/fifo:

Re: [Haskell-cafe] I/O system brokenness with named pipes

2008-04-11 Thread Brandon S. Allbery KF8NH
On Apr 10, 2008, at 21:34 , John Goerzen wrote: So I have a need to write data to a POSIX named pipe (aka FIFO). Long story involving a command that doesn't have an option to read data from stdin, but can from a named pipe. I have created the named pipe from Haskell no problem. But I can't us

Re: [Haskell-cafe] I/O system brokenness with named pipes

2008-04-11 Thread Duncan Coutts
On Thu, 2008-04-10 at 20:34 -0500, John Goerzen wrote: > I have created the named pipe from Haskell no problem. > > But I can't use writeFile to write data to it. Worse, it returns: > > *** Exception: /tmp/bakroller.zD0xHj/fifo: openFile: does not exist > (No such device or address) > Wha

Re: [Haskell-cafe] I/O system brokenness with named pipes

2008-04-11 Thread Don Stewart
jgoerzen: > So I have a need to write data to a POSIX named pipe (aka FIFO). Long > story involving a command that doesn't have an option to read data > from stdin, but can from a named pipe. > > I have created the named pipe from Haskell no problem. > > But I can't use writeFile to write data t

[Haskell-cafe] I/O system brokenness with named pipes

2008-04-11 Thread John Goerzen
So I have a need to write data to a POSIX named pipe (aka FIFO). Long story involving a command that doesn't have an option to read data from stdin, but can from a named pipe. I have created the named pipe from Haskell no problem. But I can't use writeFile to write data to it. Worse, it returns