status = Perl_do_open9(aTHX_ handle_orig, "<&", 2, FALSE, O_RDONLY, 0, Nullfp, (SV*)handle, 1); Perl_do_close(aTHX_ handle, FALSE); (void)hv_delete(gv_stashpv("Apache::RequestIO", TRUE), GvNAME(handle), GvNAMELEN(handle), G_DISCARD); if (status == 0) { Perl_croak(aTHX_ "Failed to restore STDIN: %_", get_sv("!", TRUE));
if (handle != (GV*)Nullsv) { SV *err = Nullsv;  MP_TRACE_o(MP_FUNC, "restoring STDIN");  if (Perl_do_open9(aTHX_ handle_orig, "<&", 2, FALSE, O_RDONLY, 0, Nullfp, (SV*)handle, 1) == 0) { err = get_sv("!", TRUE); }  Perl_do_close(aTHX_ handle, FALSE); (void)hv_delete(gv_stashpv("Apache::RequestIO", TRUE), GvNAME(handle), GvNAMELEN(handle), G_DISCARD);  if (err != Nullsv) { Perl_croak(aTHX_ "Failed to restore STDIN: %_", err); }
MP_INLINE void modperl_io_perlio_restore_stdin(pTHX_ GV *handle){    GV *handle_orig = gv_fetchpv("STDIN", FALSE, SVt_PVIO);    int status;    MP_TRACE_o(MP_FUNC, "start");    /* Perl_do_close(aTHX_ handle_orig, FALSE); */    /* open STDIN, "<&STDIN_SAVED" or die "Can't dup STDIN_SAVED: $!"; */    status = Perl_do_open9(aTHX_ handle_orig, "<&", 2, FALSE, O_RDONLY,                           0, Nullfp, (SV*)handle, 1);    Perl_do_close(aTHX_ handle, FALSE);    (void)hv_delete(gv_stashpv("Apache::RequestIO", TRUE), 		    GvNAME(handle), GvNAMELEN(handle), G_DISCARD);    if (status == 0) {        Perl_croak(aTHX_ "Failed to restore STDIN: %_", get_sv("!", TRUE));    }    MP_TRACE_o(MP_FUNC, "end\n");}