lkml.org 
[lkml]   [1997]   [Feb]   [26]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
From(Marc Lehmann)
SubjectRe: wierd behaviour...
DateWed, 26 Feb 1997 20:57:46 +0100 (MET)
>too complicated tests give wierd results and wrong conclutions...  try

You should have tried it..

>and you'll realize that these writes are ~5-10 secs after you start the image.

You SHOULD have tried it.. the writes are instant. run it in a shell-loop,
and your drive light keeps going all the time!

I didn't believe it at first, but:

main(){ pause(); }
compiled, started, and interrupted does nothing (well, after
some time, the atime is updated).. as one would expect.

main(){ fork(); }
on the other hand DOES write to my harddisk, quite loudly, BTW..
this has NOTHING to do with the atime update.

after killing syslogd (maybe some log-file gets written), I still
get the disk-activity...

checked under 2.1.14 (the last one that did compile so far :-)

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...)

  ---------------------------------------------------------------------
      for a pentium-optimizing gcc, look at http://www.goof.com/pcg

      -----==-
      ----==-- _
      ---==---(_)__  __ ____  __       Marc Lehmann
      --==---/ / _ \/ // /\ \/ /       mlehmann@hildesheim.sgh-net.de
      -=====/_/_//_/\_,_/ /_/\_\       pcg@goof.com
    The choice of a GNU generation
\
 
 \ /
  Last update: 2005-03-22 12:39    [from the cache]
©2003-2008