Documentation ¶
Rendered for darwin/amd64
Overview ¶
Package getargv fetches the arguments of other processes in multiple formats
The getargv package can only be used on macOS, because other operating systems have other means of accessing these arguments.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AsBytes ¶
AsBytes gets the arguments of pid as a slice of bytes, with skip leading arguments skipped, and NUL bytes replaced with spaces if nuls is true it can return an error if:
- the caller does not have permission to view the arguments of the target pid
- the target pid does not exist
- the kernel returns the targeted pid's args in an invalid format
- the targeted pid's args are too long (somehow longer than ARG_MAX) and cannot be parsed safely.
- AsBytes was asked to skip more args than targeted pid has.
func AsString ¶
AsString gets the arguments of pid as a string, with skip leading arguments skipped, and NUL bytes replaced with spaces if nuls is true it can return an error if:
- the caller does not have permission to view the arguments of the target pid
- the target pid does not exist
- the kernel returns the targeted pid's args in an invalid format
- the targeted pid's args are too long (somehow longer than ARG_MAX) and cannot be parsed safely.
- AsString was asked to skip more args than targeted pid has.
func AsStrings ¶
AsStrings gets the arguments of pid as a slice of strings, it can return an error if:
- the caller does not have permission to view the arguments of the target pid
- the target pid does not exist
- the kernel returns the targeted pid's args in an invalid format
- the targeted pid's args are too long (somehow longer than ARG_MAX) and cannot be parsed safely.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.