This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: flushing not always done on exit?


Shaffer, Kenneth schrieb:
To solve some weird "periodic" hangs where a script depends on the output
of a previous portion of the script, I've had to insert "sync" command. My
scripts use awk, sed, and grep, to name a few.

I haven't come up with a simple test case yet, but thought I'd raise a
caution flag.

It would be interesting to repeat those hangs without, and then fixes with sync on cygwin, because sync on cygwin is a no-op. See the src.


Only explicit fsync(3) calls will help.
Or most likely a small sleep() will help. your sync just burned some cycles in spirit to sleep.


Filesystems are lazy, not just a windows fs.
--
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/

--
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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]