puppetlabs/facter — pull request #388 by jeffmccune (2013-01-30 23:38:42+00:00)
Title: Misc exec to ruby transformations (Try 2)

closes #266 because this change set is updated and rebased on master.

This transforms various uses of exec into plain Ruby code.

That includes a bunch of places where exec cat /proc/... is used to work
around the briefly reintroduced kernel bug (thanks, RHEL) that caused
select on proc files to behave super-badly. (Which the Ruby runtime
used, showing the problem.)

Instead of papering over the problem by doing something slower and more
awful in some-but-not-all places in our code that touch /proc, if fixing
this matters we should just detect if we are on a problem system at load
time and patch File.read, File.open, and friends directly to handle this
secretly and internally. Everyone wins then, especially people who don't
know how it works.