daemon problem please help
hi.. this is my first post here.. btw im making a daemon for processes...
is there a way that i can define if the process is null or not or there is another way to detect if it is up or not...
heres a sample of the code
when i run the daemon ans httpd is already up.. it starts httpd.. can someone help me? thanks..:D
fp = popen("cat /proc/*/status | grep 'httpd'", "r");
if(fp == NULL)
fpup = popen("cat /proc/loadavg", "r");
while(fscanf(fp, "%d ", &load) != EOF)
if(load > 4)