Boot sequence of /proc filesystem

From: sounak chakraborty
Date: Wed Mar 09 2005 - 00:14:33 EST

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

Thanks in advance.

Yahoo! India Matrimony: Find your partner online.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at