This is the mail archive of the
cygwin
mailing list for the Cygwin project.
bi-directional named pipe
- From: Eric Blake <ebb9 at byu dot net>
- To: cygwin at cygwin dot com
- Date: Thu, 2 Jul 2009 14:55:16 +0000 (UTC)
- Subject: bi-directional named pipe
The upcoming upstream Autoconf 2.64 release will introduce a new feature for
parallel testsuite execution, which can vastly decrease the time spent testing
several packages (autoconf itself, m4, tar, findutils, ...). However, it
currently requires support for bi-directional named pipes. POSIX does not
require this, but Linux provides it; is there any chance of implementing it in
cygwin?
On Linux:
% mkfifo fifo
% exec 5<>fifo
% echo hi >&5
% read a <&5
% exec 5<&-
% echo $a
hi
% rm fifo
%
On Cygwin:
$ mkfifo fifo
$ exec 5<>fifo
$ echo hi >&5
bash: echo: write error: Communication error on send
$ echo $?
1
$ read a <&5
$ echo $?
1
$ exec 5<&-
$ echo $a
$ rm fifo
$
In isolation, I can work around this with two fd's, but the autoconf usage is
more involved, so I'm not sure if using two fd's instead of a single read-write
fd will introduce other problems.
$ exec 5<fifo 6>fifo
$ echo hi >&6 &
$ read a <&5
$ wait $!
$ exec 5<&- 6>&-
$ echo $a
hi
$ rm fifo
$
--
Eric Blake
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple