terminal operations before exec of child process