1
0
mirror of https://github.com/janet-lang/janet synced 2025-10-31 07:33:01 +00:00

Add CLOEXECs when getting file descriptors (#374)

This should help address leaking file descriptors in multithreaded
programs. There are a few cases where a race can occur though, as
some apis (fopen and mktemp).
This commit is contained in:
Calvin Rose
2020-05-06 18:33:25 -05:00
parent 9aefb59afe
commit dc3e9fb77c
4 changed files with 24 additions and 9 deletions

View File

@@ -26,7 +26,7 @@
#define JANET_FEATURES_H_defined
#ifndef _POSIX_C_SOURCE
#define _POSIX_C_SOURCE 200112L
#define _POSIX_C_SOURCE 200809L
#endif
#if defined(WIN32) || defined(_WIN32)