Hello shrinand,
--- Shrinand Javadekar <[EMAIL PROTECTED]>
wrote:
> > Are you sure if anything can be written to /Proc?
> if yes, I thiink
> > only root is able to write,.
> >
>
If you are accessing /proc/spoon with user program
thats executed as root then theres no problem to write
/proc entries. I already did that and able to write to
/proc entry.
> If no one can write to /proc how is it used for
> communication between
> kernel mode and user mode?
/proc is virtual filesystem that stores kernel
internal states in various files under /proc dir.
You are confusing with /proc system. Kernel
writes to /proc entries via
typedef int (get_info_t)(char *, char **, off_t, int);
interface provided by proc_fs.h check
/usr/src/linux-2.4/include/linux/proc_fs.h
how user mode communicates kernel=> by using say
cat /proc/net/route to print kernel IP routing table
> And all the code that I am trying out is being
> executed as root. Yet
> it does not work.
> In fact I even tried to open the file /proc/spoon
> (as root )using vi.
> It opens, but does not allow me to write to it.
>
> -Shri
> --
>
Hope this helps you to understand /proc
regards,
linux_lover.
______________________________________________________________________
> Pune GNU/Linux Users Group Mailing List:
> ([email protected])
> List Information:
> http://plug.org.in/mailing-list/listinfo/plug-mail
> Send 'help' to [EMAIL PROTECTED] for
> mailing instructions.
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
--
______________________________________________________________________
Pune GNU/Linux Users Group Mailing List: ([email protected])
List Information: http://plug.org.in/mailing-list/listinfo/plug-mail
Send 'help' to [EMAIL PROTECTED] for mailing instructions.