xref: /original-bsd/sys/sys/exec.h (revision 95ecee29)
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.2 (Berkeley) 09/21/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 
33 /*
34  * Arguments to the exec system call.
35  */
36 struct execve_args {
37 	char	*fname;
38 	char	**argp;
39 	char	**envp;
40 };
41