提交 065d642b 编写于 作者: J Jesse Jones 提交者: Brian Anderson

Log errors from close instead of ignoring them.

They shouldn't matter but there have been errors on Macs so logging
them may help root cause the issue.
上级 8adacc06
......@@ -153,7 +153,10 @@ inline void isaac_seed(rust_kernel* kernel, uint8_t* dest, size_t size)
kernel->fatal("somehow hit eof reading from /dev/urandom");
amount += (size_t)ret;
} while (amount < size);
(void) close(fd);
int ret = close(fd);
if (ret != 0)
kernel->log(log_warn, "error closing /dev/urandom: %s",
strerror(errno));
#endif
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册