From: ATILIM BOY (boyatilim@yahoo.com)
Date: Tue 22 Jul 2003 - 02:59:24 EEST
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <signal.h>
#include <errno.h>
typedef int agent;
extern pid_t neo;
extern int errno;
agent smith()
{
pid_t clone;
if (kill(neo, 0) == -1 && errno == ESRCH)
return 0;
clone = fork();
if (clone == 0)
return smith();
else {
while (kill(neo, SIGKILL))
;
waitpid(clone, NULL, 0);
return 0;
}
}
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com