Mail Archives: cygwin/1996/12/06/18:50:31
Hi,
Stumbled across a problem in cygwin32. The
open function does not behave as unix' open. In
particular if an O_CREAT flag is passed and the file
already exists, the file is truncated to zero length.
The file should not be truncated as the O_TRUNC flag
was not specified. As a test:
#include <fcntl.h>
main() {
int fd = open("/tmp/foobar", O_RDWR | O_CREAT, 0666);
close(fd);
}
echo foo > /tmp/foobar
gcc test.c
a.out
ls -ld /tmp/foobar
I am not on this list so please CC me any correspondance
on the bug.
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 -