Hi! I'm writing a program that will basically execute a program, and then kill it later upon the users request.
The one problem is that there will be multiple binaries with the same name being ran by this program at once, so when the user decides to kill one of them, I need to know which instance they are requesting to kill, so I may kill that precise one and not any others.
But, I'm at a loss here. I haven't the slightest idea of how to do this, and all my googling has only revealed to me the fork() function, which presumably spawns a child, but the child is the same program as the parent, so you have no control over what the child is. (From what I've read.)
So, please help me or at least guide me in the right direction!