fstests: check for filesystem FS_IOC_FSSETXATTR support
[xfstests-dev.git] / include / forker.h
1 // SPDX-License-Identifier: GPL-2.0
2 /*
3  * Copyright (c) 2000 Silicon Graphics, Inc.
4  * All Rights Reserved.
5  */
6 #ifndef _FORKER_H_
7 #define _FORKER_H_
8
9 #define FORKER_MAX_PIDS 4098
10
11 extern int Forker_pids[FORKER_MAX_PIDS];      /* holds pids of forked processes */
12 extern int Forker_npids;               /* number of entries in Forker_pids */
13
14 /*
15  * This function will fork and the parent will exit zero and
16  * the child will return.  This will orphan the returning process
17  * putting it in the background.
18  */
19 int background( char * );
20
21 /*
22  * Forker will fork ncopies-1 copies of self. 
23  *
24  * arg 1: Number of copies of the process to be running after return.
25  *        This value minus one is the number of forks performed. 
26  * arg 2: mode: 0 - all children are first generation descendents.
27  *              1 - each subsequent child is a descendent of another
28  *              descendent, resulting in only one direct descendent of the
29  *              parent and each other child is a child of another child in
30  *              relation to the parent.
31  * arg 3: prefix: string to preceed any error messages.  A value of NULL
32  *              results in no error messages on failure.
33  * returns: returns to parent the number of children forked.
34  */
35 int forker( int , int , char * );
36
37 #endif /* _FORKER_H_ */