2005-03-09 05:13:38

by sounak chakraborty

[permalink] [raw]
Subject: Boot sequence of /proc filesystem

Hi,
I am writing some piece of code in the
linux kernel 2.6.8 , in the files
linux-2.6.8/kernel/fork.c ( in function do_fork() )
and linux-2.6.8/kernel/exit.c ( in the function
do_exit() ).

My objective is to execute the code immediately
after the kernel has mounted the /proc filesystem.
This is because i am creating new subdirectories in
the /proc fs.

What is the checking condition i should place
inside the kernel so that i can verify that the /proc
fs has been mounted during booting and now my code can
be executed by the kernel.

Is there any global variable that gets turned on
when the /proc fs is mounted during booting.

Also my code should continue executing until the
/proc fs has been unmounted during shutdown process.

It would really help me if you can suggest a
wayout.

Thanks in advance.
Sounak

________________________________________________________________________
Yahoo! India Matrimony: Find your partner online. http://yahoo.shaadi.com/india-matrimony/