On Mon, Sep 23, 2013 at 12:37:10PM +0300, Riku Voipio wrote: > Hi, Hi Riku,
> > On Mon, Sep 16, 2013 at 03:08:06PM +0200, edgar.igles...@gmail.com wrote: > > From: "Edgar E. Iglesias" <edgar.igles...@gmail.com> > > > > If the host lacks support for SOCK_CLOEXEC or SOCK_NONBLOCK, > > try to emulate them with fcntl() FD_CLOEXEC and O_NONBLOCK. > > Last time emulating CLOEXEC with fcntl was discussed, the idea > was rejected[1]. The whole point of CLOEXEC flag is guarantee > race free open, which when implemented this way it is no longer. > > It is better to tell the userspace that atomic operation is not > available and let the userspace app/library to cope with that, > than give the application false sense of safety. Agreed, I'll send a v2 that EINVALs on lack of SOCK_CLOEXEC. My primary concern is to avoid the build error of qemu. Thanks, Edgar