-
child process
I have a child process running in the background it is created from the main program with the command
system("./habbit&");
How do I kill the child process without killing the main program?
Is there a command for doing this or some function?
If I use the fork command it freezes the main program.
Thanks...
-
-
-
ok I use kill, but I cannot retrieve the child PID from within the main program to kill the child process. Therefore if I kil anything it will kill the main program and the child program. I am using a unix platform. help.
Thanks
-
Ok I don't know why i did not think of this eariler. But, I just placed an "getpid" in the child program and returned it to temp file, then I read it into the main program and finally used a keyboard command to execute the kill for the child. Now I can start and kill a child process at will thanks guys.