xref: /csrg-svn/sys/sys/exec.h (revision 65772)
146439Sbostic /*-
261064Sbostic  * Copyright (c) 1992, 1993
361064Sbostic  *	The Regents of the University of California.  All rights reserved.
4*65772Sbostic  * (c) UNIX System Laboratories, Inc.
5*65772Sbostic  * All or some portions of this file are derived from material licensed
6*65772Sbostic  * to the University of California by American Telephone and Telegraph
7*65772Sbostic  * Co. or Unix System Laboratories, Inc. and are reproduced herein with
8*65772Sbostic  * the permission of UNIX System Laboratories, Inc.
923413Smckusick  *
1046439Sbostic  * %sccs.include.redist.c%
1146439Sbostic  *
12*65772Sbostic  *	@(#)exec.h	8.3 (Berkeley) 01/21/94
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)))
3764507Smckusick 
3864507Smckusick /*
3964507Smckusick  * Arguments to the exec system call.
4064507Smckusick  */
4164507Smckusick struct execve_args {
4264507Smckusick 	char	*fname;
4364507Smckusick 	char	**argp;
4464507Smckusick 	char	**envp;
4564507Smckusick };
46