Assuming you have only forked once, there is no way to keep the program running while killing both the parent and the child process. In fact, I am not really sure what you mean exactly when you refer to "the whole program itself"; the program, when running, consists merely of the parent process and its children (with associated data etc. of course)
Maybe you could post a clarification to explain what exactly you want to do? Also, posting your program (or part of it) might help, if that's possible.
--
mowgli