I wrote a program that will run for x number of seconds, but I want to write another C program that will stop the first program whenever invoked.

Does anyone know how to do that? I have heard from some of my CS friends that I have to use the Dynamic Data Exchange protocol? Can somebody point me to some relevant resources?