Reopening stdin, stdout and stderr if they are pointing to /dev/null.