Hello, On 11/19/2014 02:24 PM, Pádraig Brady wrote:
On 19/11/14 00:40, Assaf Gordon wrote:
<...>
With the above script, 'dd' prints the following: dd: error reading ‘standard input’: Resource temporarily unavailableThat error is fine in itself and is just dd indicating that there is no data available. I.E. the shell may have read all the data from the fifo and is splitting it up with the read builtin. So it would probably be better to avoid the read built in and use a loop like:
<...>
However dd's setting of O_NONBLOCK on the _shared_ descriptor is problematic as it persists across the invocation of dd: http://homepage.ntlworld.com/jonathan.deboynepollard/FGA/dont-set-shared-file-descriptors-to-non-blocking-mode.html That's a very non obvious gotcha. I wonder should we have an [io]flag=block to allow resetting this in dd?
Thank you, that's a terrific FGA post. I guess for simplicity I'll stay with the 1s delay. - Assaf.
