fork() returns the pid of the child forked.
The child can be killed by calling kill( pid, SIGHUP ) on the child's pid.
There are several signals that will kill a process. SIGHUP is the 'kind' way to kill it. Some process do catch signals and are programmed to either ignore some signals or handle them in some other way. (like the inetd) Processes can most always be killed with a SIGKILL signal. If SIGABRT is used correctly it will cause a core dump. Usefull if you are debbugging.
You should rellay post questions like this in the programming section.
Hope this helps