delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/07/12/17:30:42

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: Mon, 12 Jul 2004 23:30:39 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Problem with echo in tcsh 6.13.00-2 in Cygwin 1.5.10 (fwd)
Message-ID: <20040712213039.GA32187@cygbert.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <Pine DOT LNX DOT 4 DOT 44 DOT 0407121449500 DOT 6963-101000 AT druid DOT Colorado DOT EDU>
Mime-Version: 1.0
In-Reply-To: <Pine.LNX.4.44.0407121449500.6963-101000@druid.Colorado.EDU>
User-Agent: Mutt/1.4.2i

On Jul 12 14:53, David Mastronarde wrote:
> 
> The latest version of tcsh has a problem with the built-in echo.
> When echo is used to write to a file from within a script, and then the
> script runs a program that attempts to open the file, the program is not
> able to open the file.
> 
> The attachment has a sample program, fortopen.f, which gave the problem 
> when compiled with the Intel Fortran compiler.  A C program using
> fopen did not show the problem.  The problem also does not occur when the
> program is compiled with g77 under Cygwin.  The executable made the tar 
> file too large for your mail program, so it is not included.  (Please 
> tell me a better email address to use if you need it from me.)
> 
> The script echotest uses echo to write to a file, then runs fortopen which 
> tries to open the file.  It does it first with echo piped to cat, and with 
> /bin/echo, which do not fail, then it does it with the built-in echo, 
> which fails with permission denied.
> 
> The problem occurs only with tcsh 6.13, not tcsh 6.12 (see two output 
> files).
> 
> I am running Windows XP SP1.

Me too.  I've build your test application and ran it under tcsh 6.13.00
and I had no problem with it:

$ uname -a
CYGWIN_NT-5.1 cathi 1.5.10(0.116/4/2) 2004-05-25 22:07 i686 unknown unknown Cygwin
$ echo $version
tcsh 6.13.00 (Astron) 2004-05-19 (i386-intel-posix) options 8b,nls,dl,al,kan,rh,color,dspm
$ g77 -o fortopen fortopen.f
$ ls -l
total 82
-rw-r--r--    1 corinna  root        17151 Jul 12 22:10 cygcheck.out
-rw-r--r--    1 corinna  root          515 Jul 12 22:13 echoout.6.12
-rw-r--r--    1 corinna  root          746 Jul 12 22:15 echoout.6.13
-rwxr-xr-x    1 corinna  root          363 Jul  8 23:10 echotest
-rwxr-xr-x    1 corinna  root        60868 Jul 12 23:08 fortopen.exe
-rwxr-xr-x    1 corinna  root          372 Jul  8 22:56 fortopen.f
-rw-r--r--    1 corinna  root           12 Jul 12 23:12 tempfile
$ ./echotest 
Trying with echo pipe to cat
0000000 061 040 060 040 060 040 061 040 060 040 060 012
0000014
-rw-r--r--    1 corinna  root           12 Jul 12 23:26 tempfile
 File Opened OK
Trying with /bin/echo
0000000 061 040 060 040 060 040 061 040 060 040 060 012
0000014
-rw-r--r--    1 corinna  root           12 Jul 12 23:26 tempfile
 File Opened OK
Trying with built-in echo
0000000 061 040 060 040 060 040 061 040 060 040 060 012
0000014
-rw-r--r--    1 corinna  root           12 Jul 12 23:26 tempfile
 File Opened OK
$


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Co-Project Leader          mailto:cygwin AT cygwin DOT com
Red Hat, Inc.

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