store pid server and kill it