delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/03/29/17:10:55

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
From: Igor Sheyn <sheyn AT cs DOT bu DOT edu>
Date: Mon, 29 Mar 1999 17:09:32 -0500 (EST)
Message-Id: <199903292209.RAA26650@csa.bu.edu>
To: cygwin AT sourceware DOT cygnus DOT com
Subject: 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 AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019