fix a bug where kill pid won't kill the process if it is the current process