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 reaches the echo statement,
even though I don't think I've asked bash to read from that file
descriptor (yet). The plan was to use "read -t 0 <&3" at a later stage
to check if something is available there.
The following series of statements will however not block and echo
"done" immediately:
mkfifo foo; exec 3<>"foo"; echo done
This also blocks:
mkfifo foo; exec 3>"foo"; exec 3<"foo"; echo done
Why is this?
My current version of bash:
GNU bash, version 4.1.5(1)-release (x86_64-pc-linux-gnu)