|
RE: Syscall to obtain the commandline arguments a process was started with?
|
03/12/2014 3:07 PM
post109367
|
RE: Syscall to obtain the commandline arguments a process was started with?
> -----Message d'origine-----
> De : Colin Burgess [mailto:community-noreply@qnx.com]
> Envoyé : 12 mars 2014 14:30
> À : general-community@community.qnx.com
> Objet : Re: Syscall to obtain the commandline arguments a process was started
> with?
>
> in QNX 6.6.0 you can read the /proc/<pid>/cmdline
>
> This is a null separated argv list, similar to linux
>
Couldn't find any reference to this in the doc ( Steve are you reading this)
ls -l /proc/<pid> only shows as
ls /proc/<pid> shows as, cmdline and execfile as expected
cat /proc/<pid>/cmdline
/proc/<pid>/cmdline: No such process
Is that expected?
> /proc/<pid>/exefile is also present in 6.6.0
>
> In versions prior to 6.6.0 you would have to do what pidin used to do, use the
> debug interface to locate the primary stack, and parse through the argv, auxv
> and envp arrays.
>
|
|
|
|
Re: Syscall to obtain the commandline arguments a process was started with?
|
03/13/2014 5:29 AM
post109393
|
Re: Syscall to obtain the commandline arguments a process was started with?
Thanks for your reply, Colin. I'm working wit 6.50SP1, so I'll have to use the pidin way to do it. Can you point to any
piece of information explaining a little bit more detailed how to do it?! I'm not yet familiar with using "the debug
interface to locate the primary stack, and parse through the argv, auxv and envp arrays".
|
|
|
|
Re: Syscall to obtain the commandline arguments a process was started with?
|
03/13/2014 5:31 AM
post109394
|
Re: Syscall to obtain the commandline arguments a process was started with?
> in QNX 6.6.0 you can read the /proc/<pid>/cmdline
>
> This is a null separated argv list, similar to linux
>
> /proc/<pid>/exefile is also present in 6.6.0
>
> In versions prior to 6.6.0 you would have to do what pidin used to do,
> use the debug interface to locate the primary stack, and parse through
> the argv, auxv and envp arrays.
Thanks for your reply, Colin. I'm working wit 6.50SP1, so I'll have to use the pidin way to do it. Can you point to any
piece of information explaining a little bit more detailed how to do it?! I'm not yet familiar with using "the debug
interface to locate the primary stack, and parse through the argv, auxv and envp arrays".
|
|
|