Re: Printing environment variables for a process

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Martin Candurra wrote:
Yes, it is possible.
...
I wrote a function that do this (copy_from_user_space() ) and another one to dump the environment of a task (using its pid) to the kernel ring buffer. (I have just tested over i386).

If someone knows a more efficient (or elegant) way of do this, please let me know.

Well, the /proc filesystem allows one process to print out
the environment of another process (via 'cat /proc/<pid>/environ')
There must be something in the proc fs which does this.  It might
be worth looking there.
 -- Tim

=============================
Tim Bird
Architecture Group Chair, CE Linux Forum
Senior Staff Engineer, Sony Corporation of America
=============================


--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux