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 <[EMAIL PROTECTED]> available from public key server
network or from www.blorch.org/bob

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

--
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/

Reply via email to