This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project. See the Cygwin home page for more information.
Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

setbuf() problem



Hi,

the following simple program coredumps under B20.1:

#include <stdio.h>

main(int argc, char **argv[])

{
  FILE *logfile;
  logfile=fopen((const char *)argv[1],"a");
  setbuf(logfile, (char *)NULL);
  fclose(logfile);
}

The problem appears to be a combination of "a" and setbuf().
If I use "w" instead of "a", or I don't use setbuf(), it works
fine.  Is it a bug?  CygWin limitation? Windows NT limitation?

Thanks

Igor

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com