I\'m doing fork in my main program,and doing exec in the child process which will run another program. Now i want to terminate the child(i.e., the program invoked by exec) and r
POSIX defines the kill(2) system call for this:
kill(pid, SIGKILL);