internal/fd: Destructors cannot take exceptions
diff --git a/src/gpioplus/internal/fd.cpp b/src/gpioplus/internal/fd.cpp
index 5646bd9..ef7c719 100644
--- a/src/gpioplus/internal/fd.cpp
+++ b/src/gpioplus/internal/fd.cpp
@@ -1,4 +1,5 @@
#include <cerrno>
+#include <cstdlib>
#include <fcntl.h>
#include <gpioplus/internal/fd.hpp>
#include <system_error>
@@ -24,7 +25,14 @@
Fd::~Fd()
{
- reset();
+ try
+ {
+ reset();
+ }
+ catch (...)
+ {
+ std::abort();
+ }
}
static int dup(int oldfd, const Sys* sys)