Issue #1414 has been reported by whaymand. ---------------------------------------- Bug #1414: Return code from waitpid not right shifted 8 bits (fix attached) http://reductivelabs.com/redmine/issues/show/1414
Author: whaymand Status: Unreviewed Priority: Normal Assigned to: Category: Target version: Keywords: Complexity: Trivial Patch: None Affected version: 0.24.4 This has been bugging me for ages... but I have never gotten around to submitting a fix until now. util.rb takes the output from Process.waitpid2 which has the shell exit code in second octet, the first is the usual stuff from wait(2) - which signal it died on and whether it dumped core. I _presume_ people aren't interested in the latter - James/Luke please confirm. So, a simple matter of >> 8 will fix it. In my example below, the ypbind service won't start and returns exit code 1. <pre> <0> [EMAIL PROTECTED] (0 jobs) /users/unix/sa_dewha/SVNCheckOut/bootstrap/puppet/modules/ztest/examples % sudo service ypbind start <1> [EMAIL PROTECTED] (0 jobs) /users/unix/sa_dewha/SVNCheckOut/bootstrap/puppet/modules/ztest/examples % sudo ./test.sh ++ pwd + MODULEDIR=/users/unix/sa_dewha/SVNCheckOut/bootstrap/puppet/modules/ztest/examples/../.. + puppet --color=false -v --no-report --server=localhost --modulepath=/users/unix/sa_dewha/SVNCheckOut/bootstrap/puppet/modules/ztest/examples/../.. --libdir=/var/lib/puppet/plugins ./setup.pp info: Autoloaded module ztest err: //ztest::setup/Service[ypbind]/ensure: change from stopped to running failed: Execution of '/sbin/service ypbind start' returned 256: </pre> but after the fix: <pre> <0> [EMAIL PROTECTED] (0 jobs) /users/unix/sa_dewha/SVNCheckOut/bootstrap/puppet/modules/ztest/examples % sudo ./test.sh ++ pwd + MODULEDIR=/users/unix/sa_dewha/SVNCheckOut/bootstrap/puppet/modules/ztest/examples/../.. + puppet --color=false -v --no-report --server=localhost --modulepath=/users/unix/sa_dewha/SVNCheckOut/bootstrap/puppet/modules/ztest/examples/../.. --libdir=/var/lib/puppet/plugins ./setup.pp info: Autoloaded module ztest err: //ztest::setup/Service[ypbind]/ensure: change from stopped to running failed: Execution of '/sbin/service ypbind start' returned 1: </pre> ---------------------------------------- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://reductivelabs.com/redmine/my/account --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en -~----------~----~----~----~------~----~------~--~---
