This is the mail archive of the
mailing list for the Cygwin project.
Redirection to file becomes garbage
- To: cygwin at cygwin dot com
- Subject: Redirection to file becomes garbage
- From: John Koger <joviko at psyphw dot psych dot wisc dot edu>
- Date: Mon, 6 Aug 2001 16:18:37 -0500
I'm having an odd problem that I couldn't find any hints about in the
FAQ or mailing lists.
I've written a C-based CD data archiving program which does many system()
calls to fairly memory- and disk-intensive tools (including big 'find' and
'sort' jobs and 'cdrecord').
The system() calls always redirect the output of the tools to a log file;
"cdrecord dev=%s -eject >> %s 2>&1",
err = system(command);
In addition, the program fprintf()s to the log file itself (and does an
fflush() of the log file handle each time).
Everything works fine under Linux (RH 6.2). Under CygWin (on Windows
98SE), everything also works fine, except that after a while, the contents
of the log file become garbage (the log file is readable up to a point,
then looks like a binary memory dump). The "garbage point" varies, and
doesn't seem to relate to any specific command.
Is my program running out of some resource (like heap space, maybe)? Or
is there an environmental limit under DOS/Cygwin (like something on
the CONFIG.SYS line
shell=C:\command.com /e:4096 /p
needs to be increased or changed? Or, is appending to a file that other
(sub)processes are writing to not totally kosher under CygWin?
Any thoughts or ideas are much appreciated.
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html