This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Strange behaviour w/ read/write
- From: Rasmus Hahn <rassahah at neofonie dot de>
- To: cygwin at cygwin dot com
- Date: Wed, 19 Nov 2003 23:20:58 +0100
- Subject: Strange behaviour w/ read/write
Hi
I am using the current cygwin version (dll version 1-5-5-1) and see some
strange behaviour while using the read/write system calls.
In short: I open a file with mode O_RDWR|O_CREAT, write exactly 1MB into it
and then after seeking to position 0 read the Megabyte back. Strange things
seem to happen:
- The File becomes larger during the whole process (up to some hundred bytes)
- I get an end of file most of the times though i did not read all the 1MB
- sometimes (5% of all runs) i get an EAGAIN error while reading the file
has anybody experienced something similar? I make heavy use of threads writing
different files at the same time (but not more than 1 thread per file).
I suspect cygwin to write sometimes into the wrong file. I had not been able
to reproduce this with a simple test-program, so i do not provide sample
code here, but perhaps someone has experienced similar effects? And perhaps
someone knows why i am getting EAGAIN-errors on diskfiles (i do not use
nonblocking io)?
Greetings - Rasmus
--
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/