146439Sbostic /*- 261064Sbostic * Copyright (c) 1992, 1993 361064Sbostic * The Regents of the University of California. All rights reserved. 465772Sbostic * (c) UNIX System Laboratories, Inc. 565772Sbostic * All or some portions of this file are derived from material licensed 665772Sbostic * to the University of California by American Telephone and Telegraph 765772Sbostic * Co. or Unix System Laboratories, Inc. and are reproduced herein with 865772Sbostic * the permission of UNIX System Laboratories, Inc. 923413Smckusick * 1046439Sbostic * %sccs.include.redist.c% 1146439Sbostic * 12*68364Scgd * @(#)exec.h 8.4 (Berkeley) 02/19/95 1323413Smckusick */ 1416744Ssam 1553001Sbostic #include <machine/exec.h> 1653008Smckusick 1753008Smckusick /* 1853008Smckusick * The following structure is found at the top of the user stack of each 1953008Smckusick * user process. The ps program uses it to locate argv and environment 2053008Smckusick * strings. Programs that wish ps to display other information may modify 2153008Smckusick * it; normally ps_argvstr points to the text for argv[0], and ps_nargvstr 2253008Smckusick * is the same as the program's argc. The fields ps_envstr and ps_nenvstr 2353008Smckusick * are the equivalent for the environment. 2453008Smckusick */ 2553008Smckusick struct ps_strings { 2653008Smckusick char *ps_argvstr; /* first of 0 or more argument strings */ 2753008Smckusick int ps_nargvstr; /* the number of argument strings */ 2853008Smckusick char *ps_envstr; /* first of 0 or more environment strings */ 2953008Smckusick int ps_nenvstr; /* the number of environment strings */ 3053008Smckusick }; 3153008Smckusick 3253008Smckusick /* 3353008Smckusick * Address of ps_strings structure (in user space). 3453008Smckusick */ 3553008Smckusick #define PS_STRINGS \ 3653008Smckusick ((struct ps_strings *)(USRSTACK - sizeof(struct ps_strings))) 37