Problem with <> redirection to named pipe

Eric Blake eblake@redhat.com
Thu Jul 19 12:43:00 GMT 2012


On 07/19/2012 12:53 AM, Nikolay Shirokovskiy wrote:
> Hello.
> 
> When I try:
> 
>> mkfifo fifo
>> exec 5<>fifo

POSIX says this is non-portable.  You cannot expect it to work everywhere.

> 
> I get "Device or resource busy" error message. On linux distro these
> lines work well.

As an extension to POSIX, but not as a standard.

> 
> I made some browising through archives and encountered notices that
> FIFOs implementation
> in Cygwin is incomplete. Is this the cause or I miss something?

I don't know if cgf's recent work on fifos has achieved the same
extension as Linux of being able to open a fifo for read-write; but I
know that Autoconf specifically avoids using <> on fifos, and instead
uses a background subshell where the two forks of the shell coordinate
which shell opens for read and the other opens for write, precisely
because of cygwin.

-- 
Eric Blake   eblake@redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://cygwin.com/pipermail/cygwin/attachments/20120719/14b7bd6c/attachment.sig>


More information about the Cygwin mailing list