Mail Archives: cygwin-developers/2001/03/25/10:09:42
Hi!
Saturday, 24 March, 2001 Robert Collins robert DOT collins AT itdomain DOT com DOT au wrote:
>> RC> For data transfer, I was thinking of using shared named
RC> memory:anyone
>> RC> know of caveats for that on win9x?
>>
>> 1. it won't work with non-cygwin apps.
>> 2. the biggest problem with fifo is that there can be several readers
>> and several writers. and i don't know how to implement the following
>> thing: when all writers die all readers should receive eof. and it
>> should work even if writers haven't had a chance to exit gracefully,
>> but was killed from taskmanager, for example. Similarly, when all
>> readers die, writers should unblock with EPIPE.
RC> 1. Do "non-unix" apps understand the concept of a FIFO file?
directly -- not, but they can possibly inherit, say, stdout handle
from parent cygwin process, and it can possibly be a handle of fifo.
For example, you run
"sh -c ./some-script.sh >fifo-to-script-log-processor"
and 'some-script.sh' contains non-cygwin apps
RC> I know that cygwin already has named pipe support
? what do you mean by this? do you mean native calls such as
CreateNamedPipe () etc. or something else?
RC> so is there any reason to try and make FIFO support interoperate
RC> (and what should it appear as?)
RC> 2. Do you have a reference? So far I've found lots of sys/stat.h header
RC> files :]. If you don't are writes and reads atomic?
no, at least i don't think that they must be.
RC> Do all readers recieve all the same data from each writer -
no, every byte written to fifo is read by only one reader, though it
can be anyone of them.
RC> or do they pair off? (That sounds rather dirty I know :])
i generally use linux and freebsd as reference. just logon to the
nearest linux box and try :) i've also found it quite helpful to look
into linux and/or bsd kernel sources to understand how things work.
Egor. mailto:deo AT logos-m DOT ru ICQ 5165414 FidoNet 2:5020/496.19
- Raw text -