1 /*- 2 * Copyright (c) 1992, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * %sccs.include.redist.c% 6 * 7 * @(#)exec.h 8.1 (Berkeley) 06/02/93 8 */ 9 10 #include <machine/exec.h> 11 12 /* 13 * The following structure is found at the top of the user stack of each 14 * user process. The ps program uses it to locate argv and environment 15 * strings. Programs that wish ps to display other information may modify 16 * it; normally ps_argvstr points to the text for argv[0], and ps_nargvstr 17 * is the same as the program's argc. The fields ps_envstr and ps_nenvstr 18 * are the equivalent for the environment. 19 */ 20 struct ps_strings { 21 char *ps_argvstr; /* first of 0 or more argument strings */ 22 int ps_nargvstr; /* the number of argument strings */ 23 char *ps_envstr; /* first of 0 or more environment strings */ 24 int ps_nenvstr; /* the number of environment strings */ 25 }; 26 27 /* 28 * Address of ps_strings structure (in user space). 29 */ 30 #define PS_STRINGS \ 31 ((struct ps_strings *)(USRSTACK - sizeof(struct ps_strings))) 32