X-Spam-Check-By: sourceware.org Message-ID: X-Sender: x_anbr AT hotmail DOT com From: =?iso-8859-1?B?QW5kZXJzIEJyYW5k6W4=?= To: cygwin AT cygwin DOT com Cc: lev DOT bishop AT yale DOT edu Subject: Ref http://www.cygwin.com/ml/cygwin/2005-04/msg00651.html Date: Wed, 01 Feb 2006 01:42:16 +0100 Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Hi, referring http://www.cygwin.com/ml/cygwin/2005-04/msg00651.html I have a comment, the problem seems to be more of a general kind(files that doesn't exist already don't get created for writing) as these things happen on my Cygwin system (running under Server 2003): This is the new thing I've found, note that without the pipe(i.e. | cat) the command runs just fine: >tar -cf /proc/self/fd/1 syntax.c | cat >tar: /proc/self/fd/1: Cannot write: Bad file descriptor >tar: Error is not recoverable: exiting now and this is what happens on my system with the command referred in the link above, note that the error messages are the same! >$ tar -cf >(cat) syntax.c >tar: /proc/self/fd/63: Cannot write: Bad file descriptor >tar: Error is not recoverable: exiting now Both of these commands effectively creates a temporary file for both reading and writing and that seems to be the problem, this command runs just fine because I create a file for writing: >$ tar -cf >(cat) syntax.c 63>temp and, once created, this command runs fine too, however note that the redirection of input also redirects output though it really shouldn't (try it without having the temp file first, and then with an empty temp file and check the contents afterward): >$ tar -cf >(cat) syntax.c 63$ tar -cf >(cat) syntax.c 63temp >bash: temp: No such file or directory But this always works: >$ tar -cf >(cat) syntax.c 63>temp 63(cat temp) nothing to read: >$ tar -cf >(cat temp) syntax.c 63>temp 63$ tar -cf >(cat temp) syntax.c 63temp However there is obviously also something wrong with the redirection of standard input for >(cat) because I get no output with either of these statements even after >the temp file is created (writing to temp2 while attempting to read from >temp): >$ tar -cf >(cat) syntax.c 63>temp2 63$ tar -cf >(cat) syntax.c 63temp2 So only these gives the expected output: >$ tar -cf >(cat temp) syntax.c 63>temp2 63$ tar -cf >(cat temp) syntax.c 63temp2 Hope this helps in pinpointing the problem. Regards, Anders Brandén -- 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/