This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Problem with echo in tcsh 6.13.00-2 in Cygwin 1.5.10 (fwd)


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@cygwin.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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]