From 40da92f0fffc7b69f876ca060d9b4e6682e45a8c Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Wed, 4 Jan 2017 18:30:33 -0800 Subject: Fix close related races (POSIX close is a PITA). --- src/platform/posix/posix_impl.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/platform/posix/posix_impl.h') 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 // These types are provided for here, to permit them to be directly inlined -- cgit v1.2.3-70-g09d2