This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

1.5.19: Problem with Named Pipes


I am running Cygwin 1.5.19, and I'm experiencing some problems with named
pipes.  When reading from and writing to a named pipe, it should not matter
which process starts first, but I have found a condition which Cygwin does
not handle.

To illustrate the problem make two named pipes:

mknod -m 0600 pipe1 p
mknod -m 0600 pipe2 p

The following three commands can be executed in six different orders (3! =
6 if you remember that from college), but only five work:

ls > fifo1
cat fifo1 > fifo2
cat fifo2

So, now open three shells.  In these shells, execute the commands in every
possible order, and you will see that the following order does not work:

ls > fifo1
cat fifo2
cat fifo1 > fifo2

All three processes wait forever without passing data to each other.  In
each of the other five cases, the "cat fifo2" command will correctly echo
the directory listing from the "ls > fifo1" command, and all three
processes will exit normally.

nathan
Now,



-- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]