diff options
| author | Garrett D'Amore <garrett@damore.org> | 2017-01-04 18:30:33 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2017-01-04 18:30:33 -0800 |
| commit | 40da92f0fffc7b69f876ca060d9b4e6682e45a8c (patch) | |
| tree | 3147f840adc3815dd55693e440380992f76b1ba9 /src/platform/posix/posix_impl.h | |
| parent | c1d11425846baf22e9a07b0f2bf2ad405e0b42e5 (diff) | |
| download | nng-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.h | 5 |
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 |
