fifo's

Robert Collins robert.collins@itdomain.com.au
Mon Mar 26 23:39:00 GMT 2001


well my test cases show some interesting behaviour...

1 writer, 2 readers - the readers get the written blocks in a round
robin style. (ie if the writer writes
"1\n"
"2\n"
"3\n"
the 1st reader will get
"1\n"
"3\n"
and the 2nd reader
"2\n"

2 writers, 1 reader - seems to be atomic writes (no mixed data), but if
the writes are interleaved, the reads get the interleaved data. So
writers have to buffer their output to atomic chunks.

2 writers, 2 readers - seems to be the round robin outputs, atomic
writes, interleaved data as appropriate (union of the first two tests).

As far as interoperability with non-cygwin apps goes... my comment is
"If they wouldn't understand native Named Pipes for redirecting stdout,
then this is no different." I will attempt structure this code so it can
be pulled out to a separate dll for linking with mingw applications, or
to be built into an IFS driver down the track. (So the native apps could
be redirected to //./...../namedpathalias/ when called from a cygwin
app.)

Rob




More information about the Cygwin-developers mailing list