delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/12/05/15:55:47

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
Date: Sun, 5 Dec 2004 14:55:36 -0600
From: Bob Smart <bsmart AT blorch DOT org>
To: cygwin AT cygwin DOT com
Subject: Cygwin FIFO does not see EOF (NT4sp6, DLL 1.5.11)
Message-Id: <20041205145536.17e185b5@boing.blorch.org>
Organization: Blorch!
Mime-Version: 1.0

--Multipart=_Sun__5_Dec_2004_14_55_36_-0600_I819azBO0KC=RcRW
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

It appears to me that pipe (FIFO) readers don't get the same indication of EOF in Cygwin that they do in Linux.  The following Korn script works as I think it should with Linux: at startup it shows that the FIFO doesn't exist and there's no "cat" running; then it prints the test text; then it shows that the FIFO and the "cat" go away.

With Cygwin, the "cat" never finishes, even though nobody has the pipe open for writing.  Experimentation by running the "echo" and "cat" manually (in separate shells and windows) lead me to think that the "cat" simply never sees EOF on the pipe.  There are no error messages, but the "cat" doesn't terminate.

I've tried this on Samba-mounted ext2 drives and local (native NTFS) drives in the Cygwin environment but it always behaves the same way (i.e., I think it's unlikely to be Samba- or NFS-related).

A cygcheck log is attached.

To see the phenomenon:

------------------
#!/bin/ksh

ls -l fifo
ps
mkfifo fifo
echo 'Text sent via pipe' >> fifo &
sleep 30
cat fifo &
ls -l fifo
rm fifo
ls -l fifo
ps
------------------

-- 
GPG public key <bsmart AT blorch DOT org> available from public key server
network or from www.blorch.org/bob

Fingerprint BA4A 552C BE3D 8C40 ED76 F372 DF9E 320D 37FA 16AC


--Multipart=_Sun__5_Dec_2004_14_55_36_-0600_I819azBO0KC=RcRW
Content-Type: text/plain; charset=us-ascii

--
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/
--Multipart=_Sun__5_Dec_2004_14_55_36_-0600_I819azBO0KC=RcRW--

- Raw text -


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