Created by: andrewzhaosc
throws LastErrorException
will throw whenever errno is nonzero, but the value of errno is undefined unless the function otherwise indicates an error.
In certain situations, the system does in fact set errno to a nonzero value while still returning a success result. In this case, an exception will be thrown and buckd will fail to start.
This change properly checks the success of the system calls by looking at the return value as specified by the standard.
fixes #931 (closed)