Hi Gustavo, sorry for the delayed answer, but I do not follow the commits list (thank you Michaƫl for letting me know). I can confirm that your new version compiles fine.
> There is a race, if some other thread spawns a process now, the > process will inherit fd. > likewise, here we could leak the fd. That's why accept4() was introduced. Oh, okay, that's good to know. Thanks for the info. > BTW, is there some build bot with such results or somewhere I could > test MacOS to avoid breaking it? The only build bot on MacOSX I am aware of is me :/ That would be great to have a real one though... Best regards, Jean On Wed, Aug 24, 2016 at 5:37 PM, Gustavo Sverzut Barbieri <[email protected]> wrote: > pushed that change to master, let me know if it works for you. > > On Tue, Aug 23, 2016 at 8:14 PM, Gustavo Sverzut Barbieri > <[email protected]> wrote: >> On Tue, Aug 23, 2016 at 4:27 PM, Jean Guyomarc'h >> <[email protected]> wrote: >> [...] >>> - if (efl_net_socket_fd_close_on_exec_get(o)) >>> - extra_flags |= SOCK_CLOEXEC; >>> - >>> - fd = socket(addr.ss_family, SOCK_STREAM | extra_flags, IPPROTO_TCP); >>> + fd = socket(addr.ss_family, SOCK_STREAM, IPPROTO_TCP); >> >> sorry about the build break, but this is not a good solution for >> Linux. There is a race, if some other thread spawns a process now, the >> process will inherit fd. >> >> The best solution would be to #ifndef SOCK_CLOEXEC and keep both my >> code and your new code. Can you do that? >> >>> - if (efl_net_server_fd_close_on_exec_get(o)) >>> - flags |= SOCK_CLOEXEC; >>> - >>> addrlen = sizeof(addr); >>> -#ifdef HAVE_ACCEPT4 >>> - client = accept4(fd, (struct sockaddr *)&addr, &addrlen, flags); >>> -#else >>> client = accept(fd, (struct sockaddr *)&addr, &addrlen); >>> -#endif >> >> likewise, here we could leak the fd. That's why accept4() was introduced. >> >> >>> - fd = socket(addr.ss_family, SOCK_STREAM | extra_flags, IPPROTO_TCP); >>> + fd = socket(addr.ss_family, SOCK_STREAM, IPPROTO_TCP); >> >> same here. >> >> BTW, is there some build bot with such results or somewhere I could >> test MacOS to avoid breaking it? >> >> >> -- >> Gustavo Sverzut Barbieri >> -------------------------------------- >> Mobile: +55 (16) 99354-9890 > > > > -- > Gustavo Sverzut Barbieri > -------------------------------------- > Mobile: +55 (16) 99354-9890 > > ------------------------------------------------------------------------------ > _______________________________________________ > enlightenment-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel ------------------------------------------------------------------------------ _______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
