• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

Item6274: Cannot Steal STDERR mod_perl 5.8

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine Sandbox Normal New   n/a  

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

When Running twiki on windows using mod_perl.

Mod_perl version:
Embedded Perl version v5.8.8 for Apache/2.0.59 (Win32) mod_perl/2.0.3 Perl/v5.8.

Twiki version:
TWiki Release 4.3.1 (Georgetown) released on 2009-04-29

Sandbox.pm fails on line 479 when attempting to `steal` the STDERR handle.

I have read the documentation detailed at http://twiki.org/cgi-bin/view/Support/HowToFixBadFileDescriptor however this does not provide a fix for my variation of the error.

The error appears to be caused by the redirection of STDERR when running in mod_perl, I have attached a solution based on that described in the mod_perl cookbook.

The solution works by creating a code block then overriding STDERR within the block (using local) where the command is executed, once the code leaves the block STDERR reverts to the previous version.

This method is compatible with mod_perl and is a much better multi-process solution.

Please find attached, the original Sandbox.pm, the fixed Sandbox.pm and a patch.

ItemTemplate
Summary Cannot Steal STDERR mod_perl 5.8
ReportedBy TWiki:Main.JamesAustin
Codebase 4.3.1
SVN Range TWiki-5.0.0, Sat, 18 Apr 2009, build 18024
AppliesTo Engine
Component Sandbox
Priority Normal
CurrentState New
WaitingFor

Checkins

TargetRelease n/a
ReleasedIn

Topic attachments
I Attachment History Action Size Date Who Comment
Perl source code filepm Sandbox.orig.pm r1 manage 16.4 K 2009-06-06 - 02:18 JamesAustin Original Sandbox.pm
Unknown file formatpatch Sandbox.patch r1 manage 1.1 K 2009-06-06 - 02:18 JamesAustin Sandbox.pm Patch
Perl source code filepm Sandbox.pm r1 manage 16.3 K 2009-06-06 - 02:19 JamesAustin Fixed Sandbox.pm
Topic revision: r1 - 2009-06-06 - JamesAustin
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback