/************************************************/ /* */ /* Copyright: */ /* Jean-Marc Pigeon 2009 */ /* */ /************************************************/ /* This program is free software; you can */ /* redistribute it and/or modify it under the */ /* terms of the GNU General Public License as */ /* published by the Free Software Foundation */ /* version 2 of the License */ /* */ /* This program is distributed in the hope that */ /* it will be useful, but WITHOUT ANY WARRANTY; */ /* without even the implied warranty of */ /* MERCHANTABILITY or FITNESS FOR A PARTICULAR */ /* PURPOSE. See the GNU General Public License */ /* for more details. */ /* */ /* You should have received a copy of the GNU */ /* General Public License along with this */ /* program; if not, write to the Free Software */ /* Foundation, Inc., 51 Franklin Street, */ /* Fifth Floor, Boston, MA 02110-1301, USA. */ /************************************************/ /* */ /* Define utility level procedure to handle*/ /* process function. */ /* */ /************************************************/ #ifndef UTLPRC #define UTLPRC #include /*Signal to be send to check if a process is */ /*still up and running */ #define SIGCHECK 0 typedef struct { u_int nbr; /*nbr process in queue */ pid_t *pqueue; /*process queue */ }PRCTYP; extern void prc_core_dump(char *crashdir,char *temps,const char *fmt,va_list args); extern int prc_checkprocess(pid_t pid); extern void prc_nozombie(); extern PRCTYP *prc_addtoprc(PRCTYP *prclst,pid_t pid); extern PRCTYP *prc_childkill(PRCTYP *prclst,int delay); extern PRCTYP *prc_childcheck(PRCTYP *prclst); extern void prc_setpace(unsigned long millisec,int onoff); #endif