From: jqb AT netcom DOT com (Jim Balter) Subject: Re: Fw: Problems with cvs and diff 21 Mar 1997 17:13:27 -0800 Approved: cygnus DOT gnu-win32 AT cygnus DOT com Distribution: cygnus Message-ID: <33324BD1.3B0C.cygnus.gnu-win32@netcom.com> References: <97Mar20.235130-0700_mst.153161-372+7236 AT mail DOT telusplanet DOT net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.01Gold (WinNT; I) Original-To: Ken Miller Original-CC: GNU Win32 Mailing List Original-Sender: owner-gnu-win32 AT cygnus DOT com Ken Miller wrote: > > > > I looked at the diff source, and found that the problem occurs in the > > > check_stdout() function in diff.c. It is complaining that stdout is an > > > invaild file handle. > > > > How do you get that? check_stdout prints "write error" if either there > > was an I/O error on a previous write (in which case it is too late > > to know what sort of error it was) or if fclose fails. You couldn't > > know that fclose failed with "invalid file handle" just looking at the > > source. > > Sorry, I neglected to indicate that I re-compiled the source with a wee bit > of debugging code to display what was causing the error. ferror() returned > an error which, by using perror(), indicated that the handle was invalid. But that can be misleading; as I said, it's too late to know. All perror does is print the message associated with the current value of errno, which may be totally unrelated to the error that caused stdio to set the ferror bit. You might try stracing it and looking for write calls. If you don't know, setting the STRACE environment variable will cause cygwin.dll to trace its activities. You can find which bits to set in sys/strace.h; STRACE=1 will trace everything and STRACE=16 will just trace system calls. And STRACE=16,foo will write the trace output to file foo (be sure you set it only for the duration of the command or to turn it off later, else you'll have big trace logs in all your favorite directories and you'll be wondering why everything is so slow (yes, it's happened to me)). > I checked the archives, and didn't find any messages from Victor, nor any > on cvs > or diff. Here's something relevant from one of his messages: -------------- This message is cross-posted to the cygnus gnu-win32 mailing list because of recent interest in CVS in that mailing list. Future bug-fixes will be posted only to the bug-cvs mailing list. For those interested in that mailing list, subscribe by sending "subscribe bug-cvs" in a mail message to bug-cvs-request AT prep DOT ai DOT mit DOT edu. Victor J. Griswold, D.Sc. Aironet Wireless Communications, Inc. voice: 330-664-7987 fax: 330-664-7301 email: (MS-Mail) vgris AT aironet DOT com (MIME) Victor DOT Griswold AT pobox DOT com -------------- -- - For help on using this list, send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".