Next: Process File Descriptors
Up: Process Information
Previous: Process Environment
Contents
- The exe entry points to the executable file being run in a process.
- Typically the program executable name is passed as the first element of the argument list.
- Using the exe entry in the /proc file system is a more reliable way to determine which executable is running.
- The function get_executable_path in the http://siber.cankaya.edu.tr/SystemsProgramming/cfiles/get-exe-path.cprogram (See Fig. 10.5) determines the path of the executable running in the calling process by examining the symbolic link /proc/self/exe.
Figure 10.5:
Get the Path of the Currently Running Program.
|
Cem Ozdogan
2007-05-16