diff options
author | Jason Carey <jcarey@argv.me> | 2019-01-28 13:23:56 -0500 |
---|---|---|
committer | Jason Carey <jcarey@argv.me> | 2019-02-06 09:50:44 -0500 |
commit | 5eca4a77da863bd4e68bf4eb7c2d0c920982f8b9 (patch) | |
tree | 27f91d06671320c746d5c74b31d99103ba9a5679 /src/mongo/transport | |
parent | aac717125a29c27f43f9d99ef7534454ae7d1785 (diff) | |
download | mongo-5eca4a77da863bd4e68bf4eb7c2d0c920982f8b9.tar.gz |
SERVER-38935 Capture errno on error in eventfd
Capture errno before logging when we fail to allocate an eventfd. This
will preserve the precise error that occurred (instead of overwriting it
in logging code).
Diffstat (limited to 'src/mongo/transport')
-rw-r--r-- | src/mongo/transport/baton_asio_linux.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/transport/baton_asio_linux.h b/src/mongo/transport/baton_asio_linux.h index 55570768ba7..591e550bfc4 100644 --- a/src/mongo/transport/baton_asio_linux.h +++ b/src/mongo/transport/baton_asio_linux.h @@ -81,7 +81,8 @@ class TransportLayerASIO::BatonASIO : public NetworkingBaton { struct EventFDHolder { EventFDHolder() : fd(::eventfd(0, EFD_CLOEXEC)) { if (fd < 0) { - severe() << "error in eventfd: " << errnoWithDescription(errno); + auto ewd = errnoWithDescription(); + severe() << "error in eventfd: " << ewd; fassertFailed(50833); } } |