It turns out that this is fairly easy to detect without using a non-blocking read. I've just committed a change to cvs which will appear in sudo 1.6.9p6. - todd