in reply to Re^8: mod_perl, prefork mpm and alarms
in thread mod_perl, prefork mpm and alarms

I think you just need to untie STDIN. See this thread for examples.

Replies are listed 'Best First'.
Re^10: mod_perl, prefork mpm and alarms
by talexb (Chancellor) on Dec 01, 2006 at 03:17 UTC

    For those interested, the fix that perrin refers to above is as follows:

      Found this somewhere back when this bug first appeared in mod_perl:

      # work-around for mod_perl my $tie_stdin = tied *STDIN; untie *STDIN if $tie_stdin; # insert open2() or open3() statement after the above

      Gerald,

      It is a mod_perl bug, but I would consider putting it in the FAQ. Would probably be very helpful to people.

    I started work on converting the existing code to use IPC::Run, but hadn't finished by the end of the day today .. so I may put that on hold and try this fix instead.

    ++beer!

    Alex / talexb / Toronto

    "Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds

    Update: Added clarification in first paragraph as to the source of the fix.

Re^10: mod_perl, prefork mpm and alarms
by talexb (Chancellor) on Dec 01, 2006 at 16:25 UTC

    Well, just tried this fix, and it didn't change the error that pops out.

    I'm still getting

    Can't locate object method "FILENO" via package "Apache::RequestRec" at /usr/lib/perl5/5.8.0/IPC/Open3.pm line 196

    FWIW, STDIN was defined when I unTIEd it, but it made no difference to the behaviour.

    I'll go back to working on the IPC::Run approach now.

    Alex / talexb / Toronto

    "Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds

      I'm certain you could get a fix or workaround for this on the mod_perl list if you want one.