|
Lines 40-50
Link Here
|
| 40 |
|
40 |
|
| 41 |
/* |
41 |
/* |
| 42 |
* The following structure is found at the top of the user stack of each |
42 |
* The following structure is found at the top of the user stack of each |
| 43 |
* user process. The ps program uses it to locate argv and environment |
43 |
* user process. The kernel uses it to locate environment and long argv |
| 44 |
* strings. Programs that wish ps to display other information may modify |
44 |
* strings. Short argv strings (less than ps_arg_cache_limit) are stored in |
| 45 |
* it; normally ps_argvstr points to the argv vector, and ps_nargvstr |
45 |
* p_args instead. |
| 46 |
* is the same as the program's argc. The fields ps_envstr and ps_nenvstr |
46 |
* |
| 47 |
* are the equivalent for the environment. |
47 |
* To change ps output, use setproctitle(3). |
| 48 |
*/ |
48 |
*/ |
| 49 |
struct ps_strings { |
49 |
struct ps_strings { |
| 50 |
char **ps_argvstr; /* first of 0 or more argument strings */ |
50 |
char **ps_argvstr; /* first of 0 or more argument strings */ |
|
Lines 55-60
struct ps_strings {
Link Here
|
| 55 |
|
55 |
|
| 56 |
/* |
56 |
/* |
| 57 |
* Address of ps_strings structure (in user space). |
57 |
* Address of ps_strings structure (in user space). |
|
|
58 |
* Prefer the kern.ps_strings or kern.proc.ps_strings sysctls to this constant. |
| 58 |
*/ |
59 |
*/ |
| 59 |
#define PS_STRINGS (USRSTACK - sizeof(struct ps_strings)) |
60 |
#define PS_STRINGS (USRSTACK - sizeof(struct ps_strings)) |
| 60 |
#define SPARE_USRSPACE 4096 |
61 |
#define SPARE_USRSPACE 4096 |