terminate the child server process properly