This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Fw: Problems with cvs and diff

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

Victor J. Griswold, D.Sc.
Aironet Wireless Communications, Inc.
voice:  330-664-7987
fax:    330-664-7301
email:  (MS-Mail)

<J Q B>
For help on using this list, send a message to
"" with one line of text: "help".

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]