From 7fbc0e360d7a333a77c5f98624fa20c4f771f4e2 Mon Sep 17 00:00:00 2001 From: Michal Hucko Date: Wed, 6 Dec 2017 13:52:40 +0100 Subject: [PATCH] Close file descriptor of event loop's semaphore on exec --- README.md | 2 +- src/Connection.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9d99c3b..daaec20 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ References/documentation Contributing ------------ -Contributions that increase the library quality, functionality, or fix issues are very welcome. To introduce a change, please submit a merge request with a description. +Contributions that increase the library quality, functionality, or fix issues are very welcome. To introduce a change, please submit a pull request with a description. Contact ------- diff --git a/src/Connection.cpp b/src/Connection.cpp index 509d6ef..4d2b7f9 100755 --- a/src/Connection.cpp +++ b/src/Connection.cpp @@ -59,7 +59,7 @@ Connection::Connection(Connection::BusType type) if (r < 0) SDBUS_THROW_ERROR("Failed to flush system bus on opening", -r); - r = eventfd(0, EFD_SEMAPHORE); + r = eventfd(0, EFD_SEMAPHORE | EFD_CLOEXEC); SDBUS_THROW_ERROR_IF(r < 0, "Failed to create event object", -errno); runFd_ = r; }