fopen with "a+" does not respect setting file read position to start of file

2010-04-01 Thread Brebner, Gavin
We hit a problem in a code, and narrowed it down to a test case that does : while (cnt) { f=fopen(host_file, "a+"); if (!f) perror("dup_host_file: Could not open hostfile"); /* rewind(f); */ while (cnt) { int ret=fscanf(f, "%s", line); if (ret != EOF) {

fopen with "a+" does not respect setting file read position to start of file

2010-04-01 Thread Brebner, Gavin
We hit a problem in a code, and narrowed it down to a test case that does : while (cnt) { f=fopen(host_file, "a+"); if (!f) perror("dup_host_file: Could not open hostfile"); /* rewind(f); */ while (cnt) { int ret=fscanf(f, "%s", line); if (ret != EOF) {

I/O errors seen on programs passing via cygwin under heavy stress

2009-05-14 Thread Brebner, Gavin
I am routinely having problems with programs compiled and running via cygwin if they are using network shares and the level of I/O stress is high. In a typical case, I have a single Windows Server 2003 node with a single share open to all, and 3 Windows Server 2003 clients each running an