This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: freopen fails w/o complaining
- From: Benjamin Riefenstahl <Benjamin dot Riefenstahl at epost dot de>
- To: Rolf Maier <r-maier at shaw dot ca>
- Cc: cygwin at cygwin dot com
- Date: Sat, 21 Jun 2003 20:49:33 +0200
- Subject: Re: freopen fails w/o complaining
- References: <000701c337c5$00da5720$657c9244@cg.shawcable.net>
Hi Rolf,
Cygwin-xfree is the wrong list for this, where did you get the idea
that it was the right place? I'll CC this to the right list, but note
that I myself am not subscribed there, so please CC me.
Rolf Maier <r-maier@shaw.ca> writes:
> freopen does not always work, [...] Here is an example that won't
> work:
>
> #include <stdio.h>
>
> main ()
> {
> (void) freopen ("of1", "w", stdout);
> (void) puts ("xxxxxxxxxxxxxxxxxxxxxx");
> exit (0);
> }
>
> freopen will silently quit.
>
> [...]
>
> My cygwin release version (uname -a):
> CYGWIN_98-4.10 s6v4u3 1.3.22(0.78/3/2) 2003-03-18 09:20 i686 unknown unknown
> Cygwin
Your program exactly as above works fine here:
>>>>>>>>
c:\tmp> gcc freopen.c
gcc freopen.c
c:\tmp> a.exe
a.exe
c:\tmp> type of1
type of1
xxxxxxxxxxxxxxxxxxxxxx
c:\tmp> uname -a
uname -a
CYGWIN_NT-5.0 caesar 1.3.22(0.78/3/2) 2003-03-18 09:20 i686 unknown unknown Cygwin
c:\tmp>
<<<<<<<<
What did you do different? What was your command-line?
Hope this helps, benny
--
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/