<div dir="ltr">I've added a test for the EOF case.<div><br></div><div>I have written a test for EINTR case but I did not included it because it's inherently not reliable. It checks the output of operator() to see if signals resulted in us getting a lot of zero return results.</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, May 27, 2014 at 7:45 AM, Marshall Clow <span dir="ltr"><<a href="mailto:mclow.lists@gmail.com" target="_blank">mclow.lists@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div class="h5"><br><div><div>On May 20, 2014, at 2:25 AM, David Majnemer <<a href="mailto:david.majnemer@gmail.com" target="_blank">david.majnemer@gmail.com</a>> wrote:</div>
<br><blockquote type="cite"><div dir="ltr">Oops, sent out the wrong version of this patch.  Attached is what I intended to send.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, May 20, 2014 at 12:28 AM, David Majnemer <span dir="ltr"><<a href="mailto:david.majnemer@gmail.com" target="_blank">david.majnemer@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">random_device::operator() as currently implemented does not correctly handle errors returned by read.  This can result in it returning uninitialized data.<br>

<div><br></div><div>To fix this, wrap the call to read in a loop.</div></div></blockquote></div></div></blockquote><br></div></div></div><div>I like this; but can you think of any way to test it?</div><span class="HOEnZb"><font color="#888888"><div>
<br></div><div>— Marshall</div><div><br></div><br></font></span></div></blockquote></div><br></div>