Once I have read the /proc psinfo file for a given process id, can anyone tell me the best way to get the name of the command from argv[0]? The structure provides the argument list (pr_psargs) and the address of the initial argument vector (pr_argv). How could I read just argv[0] from either pr_psargs or pr_argv?
Any help would be appreciated.
Any help would be appreciated.