1. on errors, it appears to core dump, and 2. the sense of the return code is inverted from the MIT implementation. Signed-off-by: Love Hörnquist Åstrand <lha@h5l.org>