bash blocking on exec assigning an output file descriptor to a fifo

2012-02-14 Thread Øyvind Hvidsten
Please correct any mistakes in my wording, as I would very much like to be able to use the correct terms when describing this. Also, please ask if anything is unclear :) My problem occurs when I do the following: mkfifo foo; exec 3<"foo"; echo done This blocks on the exec statement, and never

Re: bash blocking on exec assigning an output file descriptor to a fifo

2012-02-14 Thread Chet Ramey
On 2/14/12 4:04 PM, Øyvind Hvidsten wrote: > Please correct any mistakes in my wording, as I would very much like to be > able to use the correct terms when describing this. Also, please ask if > anything is unclear :) > > My problem occurs when I do the following: > mkfifo foo; exec 3<"foo"; echo

Re: bash blocking on exec assigning an output file descriptor to a fifo

2012-02-14 Thread Eric Blake
On 02/14/2012 02:04 PM, Øyvind Hvidsten wrote: > Please correct any mistakes in my wording, as I would very much like to > be able to use the correct terms when describing this. Also, please ask > if anything is unclear :) > > My problem occurs when I do the following: > mkfifo foo; exec 3<"foo";

Re: bash blocking on exec assigning an output file descriptor to a fifo

2012-02-14 Thread Dan Douglas
O_NONBLOCK is up there in things I wouldn't mind using. Namely, having access to errno. I don't see any way of determining the "fullness" of a buffer even through /proc/self/fdinfo/ on Linux. -- Dan Douglas signature.asc Description: This is a digitally signed message part.