Next: Process Environment
Up: Process Information
Previous: /proc/self
Contents
- The arguments are presented as a single character string, with arguments separated by NULs.
- NUL vs. NULL. NUL is the character with integer value 0. It is different from NULL, which is a pointer with value 0.
- NULL is a pointer value that you can be sure will never correspond to a real memory address in your program.
- In C and C++, NUL is expressed as the character constant '', or (char) 0. The definition of NULL differs among operating systems; on Linux, it is defined as ((void*)0) in C and simply 0 in C++.
- The http://siber.cankaya.edu.tr/SystemsProgramming/cfiles/print-arg-list.cprogram Fig. 10.3 prints the argument list of the process with the specified process ID.
Figure 10.3:
Print the Argument List of a Running Process.
|
$ ./print-arg-list PID
Cem Ozdogan
2007-05-16