You are not logged in.
I'm modifying this program. It starts some pthreads and then does (in main)
...
while(1){
fgets(line,75,stdin);
if(line[0] == 'q' || line[0] == 'Q')
break;
}
exit_flag = 1;
pthread_cancel(foo_thread);
I want to be able to background this program and have it respond to SIGTERM etc. Right now it will only quit while backgrounded if I do SIGKILL. Is there something I can just throw in place of fgets? or do I need to do a little rewrite? I don't need any keyboard input. I'm trying to make it a daemon.
Last edited by tladuke (2012-09-28 22:38:16)
Offline
Offline