delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/05/05/12:08:00

X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
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
Message-ID: <4e225417b8AndyBurgess@argonet.co.uk>
User-Agent: Pluto/3.03h (RISC-OS/4.02) POPstar/2.06-ds.3
X-orpheus-MailScanner: Found to be clean
X-orpheus-MailScanner-SpamCheck: notspam, spamassassin (score=0.085, required 5, autolearn=disabled, AWL 0.09)
X-IsSubscribed: yes
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

Hi there,

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.

Environment:
* 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
index/program?

* 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!
 
Help?:
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.....

Cheers
Andy Burgess

-- 
 __  __  __  __      __ ___   _____________________________________________
|__||__)/ __/  \|\ ||_   |   /
|  ||  \\__/\__/| \||__  |  /...Internet access for all Acorn RISC machines
___________________________/ andyburgess AT argonet DOT co DOT uk

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