1146574Sharti/*-
2146574Sharti * Copyright (C) 2005 Max Okumoto.
3146574Sharti *	All rights reserved.
4146574Sharti *
5146574Sharti * Redistribution and use in source and binary forms, with or without
6146574Sharti * modification, are permitted provided that the following conditions
7146574Sharti * are met:
8146574Sharti * 1. Redistributions of source code must retain the above copyright
9146574Sharti *    notice, this list of conditions and the following disclaimer.
10146574Sharti * 2. Redistributions in binary form must reproduce the above copyright
11146574Sharti *    notice, this list of conditions and the following disclaimer in the
12146574Sharti *    documentation and/or other materials provided with the distribution.
13146574Sharti *
14146574Sharti * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15146574Sharti * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16146574Sharti * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17146574Sharti * ARE DISCLAIMED.  IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
18146574Sharti * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19146574Sharti * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20146574Sharti * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21146574Sharti * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22146574Sharti * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23146574Sharti * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24146574Sharti * SUCH DAMAGE.
25146574Sharti *
26146574Sharti * $FreeBSD$
27146574Sharti */
28146574Sharti
29146574Sharti#ifndef proc_h_458845848
30146574Sharti#define proc_h_458845848
31146574Sharti
32146574Sharti/**
33146574Sharti * Information used to create a new process.
34146574Sharti */
35146574Shartitypedef struct ProcStuff {
36146574Sharti	int	in;	/* stdin for new process */
37146574Sharti	int	out;	/* stdout for new process */
38146574Sharti	int	err;	/* stderr for new process */
39146574Sharti
40146574Sharti	int	merge_errors;	/* true if stderr is redirected to stdin */
41146574Sharti	int	pgroup;		/* true if new process a process leader */
42146574Sharti	int	searchpath;	/* true if binary should be found via $PATH */
43146574Sharti
44146574Sharti	char	**argv;
45146574Sharti	int	argv_free;	/* release argv after use */
46146574Sharti	int	errCheck;
47146574Sharti
48146574Sharti	pid_t	child_pid;
49146574Sharti} ProcStuff;
50146574Sharti
51146574Shartivoid Proc_Exec(const ProcStuff *) __dead2;
52146574Sharti
53146574Sharti#endif /* proc_h_458845848 */
54