NOTE: If you are a developer, please use a private wiki based on foswiki/trunk on a daily base ...or use trunk.foswiki.org to view this page for some minimal testing.
Use Item9693 for docu changes for 1.2 and 2.0.

Item10198: sysCommand calling exit breaks in mod_perl

Priority: CurrentState: AppliesTo: Component: WaitingFor:
Urgent No Action Required Engine FoswikiSandbox, ModPerlEngineContrib  
Foswiki::Sandbox::sysCommand calls exit for the child process of a fork. In a mod_perl environment, this exit is ModPerl::Util::exit which does throw resp die with an APR::Error to be caught by Foswiki::UI::_execute leading to an Unspecified error message. One suitable alternative might be to use CORE::exit instead. I'm not sure if there are better alternatives.

-- MartinVonGagern - 27 Dec 2010

Found this when triaging. Should be fairly easy to reproduce. It would explain the occasional error of this type I have seen.

Raising from Normal to Urgent, target 1.2.0

-- CrawfordCurrie - 12 Oct 2011

Child processes are clones of the parent mod_perl process, so should add to the set of available mod_perl processes. If we CORE::exit it, we will end up creating more helpers than necessary. We might need to catch APR::Error in UI.pm and allow it to propagate, as described in the mod_perl doc.

There are two failure modes for a subprocesses; first, that the exec failed to find the command, and the call returns false. Second if the command itself fails with a non-zero exit status. It is only in the first case that exit is called.

I have tried everything I can think of to get it to fail in the way described, but cannot. The exit is handled correctly, and the "Unspecified error" is never generated. Reported may have been seeing an issue with a version of mod_perl or apache, or even perl, I cannot tell.

No action required.

-- CrawfordCurrie - 22 Mar 2013

 

ItemTemplate edit

Summary sysCommand calling exit breaks in mod_perl
ReportedBy MartinVonGagern
Codebase 1.1.1
SVN Range
AppliesTo Engine
Component FoswikiSandbox, ModPerlEngineContrib
Priority Urgent
CurrentState No Action Required
WaitingFor
Checkins
TargetRelease minor
ReleasedIn 1.2.0
CheckinsOnBranches
trunkCheckins
Release01x01Checkins
Topic revision: r4 - 22 Mar 2013, CrawfordCurrie
 
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. see CopyrightStatement. Creative Commons LicenseGet Foswiki at sourceforge.net. Fast, secure and Free Open Source software downloads