implement terminate method for child processes