Mail Archives: cygwin/1997/01/28/20:33:50
Hi,
Open() will truncate existing files when the O_CREAT flag
is passed. I mentioned this before and was told that this bug
is known. I'm curious as to if its been fixed and will be
present in the next release or not. Anyone know?
Details:
If you open an existing file with the O_CREAT flag set,
the file is opened and truncated to zero bytes:
echo foo bar > test
...
int fd = open("test", O_WRONLY | O_CREAT, 0666);
close(fd);
...
now "test" is an empty file
Tim N.
-
For help on using this list, send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
- Raw text -