Re: [libuv] three questions

2018-02-27 Thread Ben Noordhuis
On Sun, Feb 25, 2018 at 9:44 PM, CM wrote: > On Friday, February 23, 2018 at 9:52:39 AM UTC-6, Ben Noordhuis wrote: >> The file descriptor may not be open and even if it is, the UNIX >> semantics of tty file descriptors are such that you don't want to keep >> them open unnecessarily. > > Can you e

Re: [libuv] three questions

2018-02-25 Thread CM
On Friday, February 23, 2018 at 9:52:39 AM UTC-6, Ben Noordhuis wrote: > > On Fri, Feb 23, 2018 at 2:48 AM, CM > > wrote: > > Q1. ... shouldn't these static variables > > be replaced with C equivalent of std::atomic<...>? > > Libuv is a C89 code base and can't use anything from stdatomic.h. >

Re: [libuv] three questions

2018-02-23 Thread Ben Noordhuis
On Fri, Feb 23, 2018 at 2:48 AM, CM wrote: > Hi, > > > Q1. There is a certain idiom used in libuv code (see this) -- namely using > unprotected static variables to mark missing features (like O_CLOEXEC). In > multi-threaded environment these spots have a race condition, which is in > C++ workd is

[libuv] three questions

2018-02-22 Thread CM
Hi, Q1. There is a certain idiom used in libuv code (see this ) -- namely using unprotected static variables to mark missing features (like O_CLOEXEC). In multi-threaded environment these spots