agreed with paul that we should create a wrapper for the kill function  to replace all the kill call in this file  probably can do it in a separate cl maybe something like this bool killprocess int pid  bool  killed this will return true if signal is sent or the process is already killed  false otherwise  the caller can use the  killed  to check if the process has already exited 