home *** CD-ROM | disk | FTP | other *** search
- static char rcsid[] = "@(#)$Id: idle_demon.c,v 2.1 07/18/90 jbc $";
- /***************************************************************************/
- /* Copyright (c) 1990 James B. Cummings, Jr. */
- /* */
- /* This program is offered in the Public Domain and is freely available */
- /* as long as this notice is kept intact with each module. */
- /***************************************************************************/
- #include "header.h"
-
- main()
- {
- char path[80];
- int i;
- int fid, status;
- void perror();
-
- for(i = 0;i <= 79;i++)
- path[i] == '\0';
-
- (void) strcpy(path,BIN);
- (void) strcat(path,"/");
- (void) strcat(path,APROG);
-
- for(;;) {
- if((fid = fork()) < 0)
- perror("fork");
-
- if(fid == 0) {
- execl(path,"idle_check",0);
- exit(1);
- }
- while(wait(&status) != fid)
- ;
- (void) sleep(120);
- }
- }
-