This is the mail archive of the
mailing list for the Cygwin project.
C exe redirection blank file
- From: andyburgess <AndyBurgess at argonet dot co dot uk>
- To: cygwin at cygwin dot com
- Date: Fri, 05 May 2006 17:04:15 +0100
- Subject: C exe redirection blank file
I have been developing a system with the wonderful Cygwin and have
encountered a problem today. A program I was developing on a development PC I
copied over to the 'live' box (through network). This program produces two
fopen'ed files written with fprintf.
Summary of issue:
* Suddenly I could no longer redirect the output of this program, and the two
files it created were now blank.
* The program also talks to the serial port at /dev/ttyS0, this aspect of the
program remained steadfastly working! It also reads an existing file to get
the port number, so is reading this OK too.
* It could have been a program change I'd made - but I hadn't changed any of
the file processing, and adding a couple of test printf statements told me it
should be writing to the files!
* I can successfully redirect output from other programs I've written (and
copied in the same way).
* I ran a PC chkdsk and it told me that "Windows has found problems with the
file system". No kidding!
* I've run multiple "chkdsk /f"s (and reboots), but cannot find any logs to
tell me what happened (if anything).
* I've tried changing the chmod's for programs and data files to no avail,
and even compiling the program on the live machine - still the same results.
* It also looked at one point as if it has written the data into incorrect
filenames in the old-program-of-the-same-name format. Huh? A broken Windows
* I've tried updating my bash etc and compiling it with a different output
name - same issue.
* I've looked on the internet and Cygwin archives for help, but can't see
anything like I've got!
Can anyone tell me if it's a Windows problem, a Cygwin problem, a virus, or a
user/programmer problem? I can clarify with any coding snippets if required,
if it's something up with my code.
Should I get rid of the Windows altogether and go to full-on to Unix/Linux?
I'm getting desperate! It's probably a silly question, but I've never set up
a Unix/Linux system myself, and am "comfortable" with Windoze and Cygwin.
Hoping for some answers.....
__ __ __ __ __ ___ _____________________________________________
|__||__)/ __/ \|\ ||_ | /
| || \\__/\__/| \||__ | /...Internet access for all Acorn RISC machines
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html