close open sub process