On 03/10/2014 06:04 PM, Ben Noordhuis wrote:
> In src/unix/core.c:
>
>> @@ -821,3 +823,93 @@ int uv_getrusage(uv_rusage_t* rusage) {
>>
>>    return 0;
>>  }
>> +
>> +
>> +int uv__open_cloexec(const char* path, int flags) {
>> +  int err;
>> +  int fd;
>> +
>> +#if defined(__linux__)
>> +  static int no_cloexec;
>> +
>> +  if (!no_cloexec) {
>> +    fd = open(path, flags | UV__O_CLOEXEC);
>
> I believe FreeBSD 10 also supports open(O_CLOEXEC) but apart from that LGTM.
>

Updated. Online man pages say it's supported since version 9, but I 
could only tested in 10, where it does work.