[Gllug] Building Intranet Kiosks

hawtink at clinkserver.com hawtink at clinkserver.com
Fri Jul 13 10:08:47 UTC 2001


> On Thu, Jul 12, 2001 at 04:24:00PM +0100, tet at accucard.com wrote:
> > 
> > >> He quite generously calls sync(), when it's not strictly necessary...
> > >
> > >Correct me if I'm wrong, but wasn't syncing three times to disk and
> > >then going to run level 0 the "ye olde" way of shutting down a UNIX
> > >system?
> > 
> > Nearly. It was:
> > 
> > 	sync; sync; sync; <hit big red power button> :-)
> > 
> > The only reason to run sync 3 times was because the command exited
> > before the data could be guaranteed to be flushed to disk. The logic
> > was that by the time the third one exited, the first one would have
> > been able to finish flushing to disk.

this was all fixed in kernel 0.99.15b or 1.0.0 ??

before this, when you had killed off all running processes went to 
runlevel 1, ran sync three times then it was about as safe as it could
be. 

but after this the kernel flushed allwrite buffers every thirty seconds.
so after changing to runlevel 1 the running sync, the power could be 
switched ...

sync now waits for the write buffers to be flushed, before it exits.

but i still sync now out of habit =) especially after saving a file...

yours,

kim


-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list