[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: broken pipe from func-output by changing network settings?

From: Ángel
Subject: Re: broken pipe from func-output by changing network settings?
Date: Tue, 17 Oct 2017 19:37:55 +0200

On 2017-10-17 at 03:28 -0700, L A Walsh wrote:
> I run the test using cygwin, and use /dev/zero and /dev/null --
> creating those files in my home directory on each platform.
> That way I can copy from /dev/zero on one platform to /dev/null on the other
> or vice-versa to get timings of file transfer speed, APART from
> file-io delays of going through the file system.
> So my question is -- how can the pipe disappear so fast
> that my "readarray out" results in a broken pipe message.
> Shouldn't that be impossible with the code above?
> FWIW, the readarray is trying to catch the output from 'dd',
> with 's' catching the status of the 'dd' command (as passed
> through nice).
> But why would changing network settings on an ethernet
> node result in pipe errors in bash?
> Ideas?

bash converts < <(  dd_need_io "$if" "$of"  ...)  into a read
from /dev/fd/62 in order to make readarray read file descriptor 62.

Given that this the host OS doesn't provide them, the first thing I
would verify would be: is cygwin, as setup on that system, providing
such descriptors?

As a simple test, you can do:
 wc -l <(cat /etc/passwd)

(change /etc/passwd to another file if that's not available)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]