This is the mail archive of the cygwin-patches@cygwin.com 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: sync(3)


Christopher Faylor schrieb:
On Wed, Oct 27, 2004 at 05:32:51PM +0200, Reini Urban wrote:
Christopher Faylor schrieb:
On Wed, Oct 27, 2004 at 04:36:17AM +0200, Reini Urban wrote:
Why is this a bad idea?

It's a very limited implementation of what sync is supposed to do but maybe it's better than nothing.

A slightly more robust method would be to implement an internal cygwin
signal which could be sent to every cygwin process telling it to run
code like the below.

A signal looks better. Maybe just to its master process, and all its subprocesses and threads?

I don't know what you mean by the master process.

the parent of some subprocesses.
exim or postgres or apache1 open a farm of subprocesses, which eventually might want to sync() logfiles or mboxes.


It's easy to send signals to every cygwin process. You don't have to worry about threads.

good.


my private coverage:
time find /usr/src -name \*.c -exec grep -H sync \{\} \;
so far is unsuccessful.
The examples I found (exim, postgresql, uw-imap) all use fsync() (of course). apache doesn't use fsync/sync (logs) at all.


But I didn't check the more likely candidates, perl/python/... or simple small servers yet.
--
Reini Urban
http://xarch.tu-graz.ac.at/home/rurban/



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