puppetlabs/facter — pull request #304 by zaphod42 (2012-08-31 21:58:22+00:00)
Title: (#10819) Avoid reading from /proc/self/mounts in ruby

Reading from /proc/self/mounts in ruby can cause hangs in certain versions
of the Linux kernel. The problem appears when a puppet agent is run with
--listen, which hold open a socket, and then ruby reads from
/proc/self/mounts. When this occurs ruby calls select on the open
filehandles which triggers a bug in the kernel that causes the select to
hang forever.

This commit uses an exec of cat instead of ruby file reading operations,
which avoids the ruby interpreter having to call select and trigger the
bug.

It appears that only /proc/self/mounts has this problem. Other areas of
/proc were tested and did not cause the error.