Inserting VZGOT development tree within GIT
[safe/jmp/vzgot] / lib / utlprc.h
1 /************************************************/
2 /*                                              */
3 /*      Copyright:                              */
4 /*       Jean-Marc Pigeon <jmp@safe.ca>  2009   */
5 /*                                              */
6 /************************************************/
7 /* This program is free software; you can       */
8 /* redistribute it and/or modify it under the   */
9 /* terms of the GNU General Public License as   */
10 /* published by the Free Software Foundation    */
11 /* version 2 of the License                     */
12 /*                                              */
13 /* This program is distributed in the hope that */
14 /* it will be useful, but WITHOUT ANY WARRANTY; */
15 /* without even the implied warranty of         */
16 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR  */
17 /* PURPOSE.  See the GNU General Public License */
18 /* for more details.                            */
19 /*                                              */
20 /* You should have received a copy of the GNU   */
21 /* General Public License along with this       */
22 /* program; if not, write to the Free Software  */
23 /* Foundation, Inc., 51 Franklin Street,        */
24 /* Fifth Floor, Boston, MA  02110-1301, USA.    */
25 /************************************************/
26 /*                                              */
27 /*      Define utility level procedure to handle*/
28 /*      process function.                       */
29 /*                                              */
30 /************************************************/
31 #ifndef UTLPRC
32 #define UTLPRC
33 #include        <stdarg.h>
34
35 /*Signal to be send to check if a process is    */
36 /*still up and running                          */
37 #define SIGCHECK        0
38
39 typedef struct  {
40         u_int nbr;      /*nbr process in queue  */
41         pid_t *pqueue;  /*process queue         */
42         }PRCTYP;
43
44 extern void prc_core_dump(char *crashdir,char *temps,const char *fmt,va_list args);
45 extern int prc_checkprocess(pid_t pid);
46 extern void prc_nozombie();
47 extern PRCTYP *prc_addtoprc(PRCTYP *prclst,pid_t pid);
48 extern PRCTYP *prc_childkill(PRCTYP *prclst,int delay);
49 extern PRCTYP *prc_childcheck(PRCTYP *prclst);
50 extern void prc_setpace(unsigned long millisec,int onoff);
51 #endif