| getargv(1) | General Commands Manual | getargv(1) |
getargv — print a
process' arguments
getargv |
[-0] [-s
skip] pid |
getargv |
[-? | -h]
[-v] |
The getargv utility prints all or some of
the arguments in the argv array of a process pid.
The options are as follows:
-0-s-s 1 would skip the
process name (argv[0]), -s 2
skips the process name and the first argument.-v-?
-hgetargv is only able to see the arguments
of processes owned by the user that ran it, unless run by root.
getargv
-0 -s 1 $PPIDgetargv assumes that you
have not compiled your own xnu kernel with a custom
PID_MAX, if you have you will need to compile
getargv with your custom
PID_MAX set thus:
$ make PID_MAX=__YOUR_CUSTOM_PID_MAX_HERE__ release
Also, it is currently a hard requirement
that PID_MAX <
ARG_MAX.
The getargv command was adapted from
nonowarn's
getargv gist
Which was itself extracted from the
ps(1) source code.
Camden Narzt ⟨getargv@narzt.cam⟩
See LICENSE file
| January 5, 2023 | Darwin |