--- libaitio/inc/aitio.h 2013/12/12 21:17:53 1.38.10.16 +++ libaitio/inc/aitio.h 2013/12/15 22:31:44 1.38.10.17 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: aitio.h,v 1.38.10.16 2013/12/12 21:17:53 misho Exp $ +* $Id: aitio.h,v 1.38.10.17 2013/12/15 22:31:44 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -82,6 +82,7 @@ typedef struct { unsigned int prog_inin; /* init progs */ unsigned int prog_maxn; /* max progs */ unsigned int prog_cnum; /* current progs */ + unsigned int prog_poll; /* purge unused instances after sec */ char prog_name[PATH_MAX]; pthread_mutex_t prog_mtx; @@ -184,6 +185,18 @@ int io_progVacuum(prog_t * __restrict prg, unsigned in * return: 0 error or !=0 closed program */ int io_progCloseAt(prog_t * __restrict prg, unsigned int idx); +/* + * io_progCloseOf() - Close program at pool with certain handle + * + * @prg = program pool + * @h = handle of program + * return: 0 error, >0 closed programs + */ +#ifdef POPEN_STREAM +int io_progCloseOf(prog_t * __restrict prg, FILE *h); +#else +int io_progCloseOf(prog_t * __restrict prg, int h); +#endif /* * io_progClose() - Close all programs in pool *