HomePhorge

(#8410) Fix child exit status on Windows
b27b01306016Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(#8410) Fix child exit status on Windows

The Process.waitpid2 method in the win32-process gem returns an array,
with the child's exit status as the last element. This is different
than ruby's implementation where the last element is a Process::Status
object, which has an exitstatus method.

As a result, if a child process returned a non-zero exit status on
Windows, then Puppet::Util.execute would raise an error while trying
to call the exitstatus method on a Fixnum (the actual exit status).

This commit ensures we consistently retrieve the exit status
across all platforms.

Details

Provenance
Josh Cooper <josh@puppetlabs.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPUa20551f43437: Updated CHANGELOG for 2.7.4rc2
Branches
Unknown
Tags
Unknown

Event Timeline

Josh Cooper <josh@puppetlabs.com> committed rPUb27b01306016: (#8410) Fix child exit status on Windows (authored by Josh Cooper <josh@puppetlabs.com>).Sep 14 2011, 6:16 PM