Also, we need to return a UV return code here, which on Unix is the negative errno. Maybe -EINVAL?