Check for xlog_assign_lsn in xfs headers
[xfstests-dev.git] / include / forker.h
1 /*
2  * Copyright (c) 2000 Silicon Graphics, Inc.
3  * All Rights Reserved.
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License as
7  * published by the Free Software Foundation.
8  *
9  * This program is distributed in the hope that it would be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write the Free Software Foundation,
16  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
17  */
18 #ifndef _FORKER_H_
19 #define _FORKER_H_
20
21 #define FORKER_MAX_PIDS 4098
22
23 extern int Forker_pids[FORKER_MAX_PIDS];      /* holds pids of forked processes */
24 extern int Forker_npids;               /* number of entries in Forker_pids */
25
26 /*
27  * This function will fork and the parent will exit zero and
28  * the child will return.  This will orphan the returning process
29  * putting it in the background.
30  */
31 int background( char * );
32
33 /*
34  * Forker will fork ncopies-1 copies of self. 
35  *
36  * arg 1: Number of copies of the process to be running after return.
37  *        This value minus one is the number of forks performed. 
38  * arg 2: mode: 0 - all children are first generation descendents.
39  *              1 - each subsequent child is a descendent of another
40  *              descendent, resulting in only one direct descendent of the
41  *              parent and each other child is a child of another child in
42  *              relation to the parent.
43  * arg 3: prefix: string to preceed any error messages.  A value of NULL
44  *              results in no error messages on failure.
45  * returns: returns to parent the number of children forked.
46  */
47 int forker( int , int , char * );
48
49 #endif /* _FORKER_H_ */