After forking, there are two different processes sharing some thing like text (code) section etc. Child knows the process id of its parent ( that information can be got from getppid() ) but it is not possible for the parent to know the id's of its children.
There is a work around for this. You can use shared memory ( list implementation) that would be used by the children to put there and parent's id while the parent would go through that list and if its id is there on the node as the parent id, it would kill the child process using kill() as child has put its pid information there.
Hope that it would help you to some extent.