Uploaded image for project: 'VCL'
  1. VCL
  2. VCL-725

utils.pm run_command does not consistently return exit status

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.3
    • 2.4
    • vcld (backend)
    • None

    Description

      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.

      Attachments

        Activity

          People

            arkurth Andrew Kurth
            arkurth Andrew Kurth
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: