Return -1 if errno is set.