delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/03/29/23:17:37

X-Spam-Check-By: sourceware.org
Message-Id: <6.2.1.2.0.20060329233049.02f06fb0@pop-server.twcny.rr.com>
Date: Wed, 29 Mar 2006 23:30:58 -0500
To: cygwin AT cygwin DOT com
From: Nate <nathan AT twcny DOT rr DOT com>
Subject: 1.5.19: Problem with Named Pipes
Mime-Version: 1.0
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019