Re: wierd behaviour...

Michael O'Reilly (michael@metal.iinet.net.au)
28 Feb 1997 08:54:16 +0800


There's a simple reason for all this. The Sysvinit does a sync() in
it's main loop. So every time it gets a SIGCHLD from a process w/o a
parent dying, it does a sync(), which flushes all the dirty buffers
(including atime mods), and voilo! Tons of disk writing.

Michael.

mlehmann@hildesheim.sgh-net.de (Marc Lehmann) writes:
[ ... ]

> btw:
> void main(void) { if(fork()) sleep(2); else sleep(1);}
>
> shows this behavious, while
>
> void main(void) { if(fork()) sleep(1); else sleep(2);}
>
> does not... (except for the atime update, which is much later..)
> i.e. if the child dies BEFORE the parent we get the behaviour,
> not otherwise round.. (hmm.. I thought it would be
> an interatcion with init or the shell, but...)