xref: /csrg-svn/sys/sys/exec.h (revision 64507)
146439Sbostic /*-
261064Sbostic  * Copyright (c) 1992, 1993
361064Sbostic  *	The Regents of the University of California.  All rights reserved.
423413Smckusick  *
546439Sbostic  * %sccs.include.redist.c%
646439Sbostic  *
7*64507Smckusick  *	@(#)exec.h	8.2 (Berkeley) 09/21/93
823413Smckusick  */
916744Ssam 
1053001Sbostic #include <machine/exec.h>
1153008Smckusick 
1253008Smckusick /*
1353008Smckusick  * The following structure is found at the top of the user stack of each
1453008Smckusick  * user process. The ps program uses it to locate argv and environment
1553008Smckusick  * strings. Programs that wish ps to display other information may modify
1653008Smckusick  * it; normally ps_argvstr points to the text for argv[0], and ps_nargvstr
1753008Smckusick  * is the same as the program's argc. The fields ps_envstr and ps_nenvstr
1853008Smckusick  * are the equivalent for the environment.
1953008Smckusick  */
2053008Smckusick struct ps_strings {
2153008Smckusick 	char	*ps_argvstr;	/* first of 0 or more argument strings */
2253008Smckusick 	int	ps_nargvstr;	/* the number of argument strings */
2353008Smckusick 	char	*ps_envstr;	/* first of 0 or more environment strings */
2453008Smckusick 	int	ps_nenvstr;	/* the number of environment strings */
2553008Smckusick };
2653008Smckusick 
2753008Smckusick /*
2853008Smckusick  * Address of ps_strings structure (in user space).
2953008Smckusick  */
3053008Smckusick #define	PS_STRINGS \
3153008Smckusick 	((struct ps_strings *)(USRSTACK - sizeof(struct ps_strings)))
32*64507Smckusick 
33*64507Smckusick /*
34*64507Smckusick  * Arguments to the exec system call.
35*64507Smckusick  */
36*64507Smckusick struct execve_args {
37*64507Smckusick 	char	*fname;
38*64507Smckusick 	char	**argp;
39*64507Smckusick 	char	**envp;
40*64507Smckusick };
41