port close and terminate process on close/