Jean,
just a heads up, I wrote a utility called exxe which could eventually replace the run script if a few more features are added. It's written in C, and relatively simple and fast. Maybe we want to switch to that at some point.
http://git.drbd.org/gitweb.cgi?p=exxe.gitI originally wrote this for the drbd test suite where we need to run various commands on various cluster nodes, send them stdin input, and capture their stdout, stderr, and exit status. The test suite keeps an ssh connection open to each cluster node; it uses this connection for running commands on the cluster node.
The test suite itself (
http://git.drbd.org/gitweb.cgi?p=drbd-test.git) is a bit of a shell hell, but there are enough test cases in exxe itself to easily understand how exxe works without having to understand the drbd test suite.