title: Advice on Mocking System Calls
body: <p>I have a class which calls <a href="http://www.opengroup.org/onlinepubs/000095399/functions/getaddrinfo.html" rel="noreferrer">getaddrinfo</a> for DNS look ups.  During testing I want to simulate various error conditions involving this system call.  What's the recommended method for mocking system calls like this?  I'm using Boost.Test for my unit testing.</p>