aboutsummaryrefslogtreecommitdiff
path: root/src/platform/posix/posix_impl.h
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2017-01-04 18:30:33 -0800
committerGarrett D'Amore <garrett@damore.org>2017-01-04 18:30:33 -0800
commit40da92f0fffc7b69f876ca060d9b4e6682e45a8c (patch)
tree3147f840adc3815dd55693e440380992f76b1ba9 /src/platform/posix/posix_impl.h
parentc1d11425846baf22e9a07b0f2bf2ad405e0b42e5 (diff)
downloadnng-40da92f0fffc7b69f876ca060d9b4e6682e45a8c.tar.gz
nng-40da92f0fffc7b69f876ca060d9b4e6682e45a8c.tar.bz2
nng-40da92f0fffc7b69f876ca060d9b4e6682e45a8c.zip
Fix close related races (POSIX close is a PITA).
Diffstat (limited to 'src/platform/posix/posix_impl.h')
-rw-r--r--src/platform/posix/posix_impl.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/platform/posix/posix_impl.h b/src/platform/posix/posix_impl.h
index 2b72f574..ed52b6fb 100644
--- a/src/platform/posix/posix_impl.h
+++ b/src/platform/posix/posix_impl.h
@@ -35,13 +35,16 @@ extern int nni_plat_errno(int);
#ifdef PLATFORM_POSIX_NET
struct nni_plat_tcpsock {
- int fd;
+ int fd;
+ int devnull; // used for shutting down blocking accept()
};
#endif
// Define types that this platform uses.
#ifdef PLATFORM_POSIX_THREAD
+extern int nni_plat_devnull; // open descriptor on /dev/null
+
#include <pthread.h>
// These types are provided for here, to permit them to be directly inlined