Kill process when close window/workspace.