record child process exit status to result file