Issue #3013 has been updated by Markus Roberts.
I have again updated the branch; this version includes a test for the SIGPIPE issue (which it fails) and the other edge cases I've been able to glean from these tickets (23 examples in total) which it passes. In some of these cases it involves transforming aberrant condition into other which are more manageable but no more "correct" (e.g. turning a hang into a failure); the exact nature of these mappings (which implicitly occur in the old code as well) should probably be addressed at some point. I have a potential solution to the SIGPIPE problem (not included in the posted code) which is not without cost. Specifically, if we detect the case and do not close the read-pipe (our end of the child's output) we can avoid SIGPIPEing the grandchild (at least until we exit), but in doing so we incur the risk of collecting (many?) orphaned pipes (there's also the complexity of GC protection). The posted version, however, does _not_ cause problems _unless_ the grandchild writes to the pipe (there is a test to verify this). So I keep coming back to my earlier point that daemons, as a general rule, are so far as I know expected to refrain from writing to STDOUT, and deserve what they get if they try. So the question is, how should this concern be prioritized? Is it something that we should go to extraordinary lengths to protect against, or is it something we can safely ignore? ---------------------------------------- Bug #3013: util.rb:execute broken on Ruby <1.8.3 http://projects.reductivelabs.com/issues/3013 Author: Ricky Zhou Status: Ready for Testing Priority: Urgent Assigned to: Markus Roberts Category: exec Target version: 0.25.3 Affected version: 0.25.2 Keywords: Branch: http://github.com/MarkusQ/puppet/tree/ticket/0.25.x/3013 Apparently the patch in ticket #2731 introduced one more issue by using readpartial, which isn't available until ruby 1.8.3 (RHEL4 at least is affected). I'm not sure how this is normally handled in ruby, but if the readpartial function is not available, the code should fall back to sysread (along with some code for handling EINTR). Anybody with better ruby knowledge know how this should be done? -- 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.
