diff options
Diffstat (limited to 'src/io/fd.cpp')
-rw-r--r-- | src/io/fd.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/io/fd.cpp b/src/io/fd.cpp index c0b44e8..bb0bbd5 100644 --- a/src/io/fd.cpp +++ b/src/io/fd.cpp @@ -102,6 +102,11 @@ namespace io int FD::close() { + if (fd == -1) + { + errno = EBADF; + return -1; + } return ::close(fd); } int FD::shutdown(int how) |