What is "close" then? There is no such thing.
The process is terminated when
is called, or if the process end by itself; for example, when a process returns from its entry point function like
You cannot force a process to do it unless it is specially designed to terminate itself on some command which came from some other process. You can always do it, but for this purpose you need to be the author of the application you need to stop and use IPC (http://en.wikipedia.org/wiki/Inter-process_communication
]). If this is the case and you need help using IPC, please provide some feedback and explain more — most likely, I would be able to help.
You cannot do it to an arbitrary process. You can only do
But I don't recommend you to do so.
From your question, I know that you know why. :-)