kill process in thread