You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@vcl.apache.org by "Andy Kurth (JIRA)" <ji...@apache.org> on 2013/09/25 18:42:05 UTC
[jira] [Commented] (VCL-725) utils.pm run_command does not
consistently return exit status
[ https://issues.apache.org/jira/browse/VCL-725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13777714#comment-13777714 ]
Andy Kurth commented on VCL-725:
--------------------------------
Author: arkurth
Date: Thu Sep 19 14:20:23 2013
New Revision: 1524750
URL: http://svn.apache.org/r1524750
Log:
VCL-725
Reworked utils.pm::run_command to call the command via backticks instead of opening a pipe. This seems to always return the correct exit status.
> utils.pm run_command does not consistently return exit status
> -------------------------------------------------------------
>
> Key: VCL-725
> URL: https://issues.apache.org/jira/browse/VCL-725
> Project: VCL
> Issue Type: Bug
> Components: vcld (backend)
> Affects Versions: 2.3
> Reporter: Andy Kurth
> Assignee: Andy Kurth
> Priority: Minor
> Fix For: 2.3.3
>
>
> utils.pm::run_command does not consistently return the correct exit status. It often returns -1. This looks to be due to timing of when REAPER is called. Sometimes REAPER enters its 'while waitpid' block, sometimes it doesn't. Either way, the exit status is inconsistent.
> I don't know of a benefit of entering REAPER for children of vcld child processes. It can be bypassed by adding the following in run_command after the process is forked:
> $SIG{CHLD} = undef;
> If this is added, the exit status is always correct. It is also correct if the entire subroutine is changed to call the command via backticks.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira