zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From phunt <...@git.apache.org>
Subject [GitHub] zookeeper issue #410: [ZOOKEEPER-2338] - set SOCK_CLOEXEC on socket if defin...
Date Fri, 17 Nov 2017 01:29:23 GMT
Github user phunt commented on the issue:

    https://github.com/apache/zookeeper/pull/410
  
    > I am not sure how
    
    Yea, same here I'm afraid.
    
    In thinking about it a bit perhaps what we could do is one of the following two option
(might be more):
    
    1)  add it with some extra tooling in autoconf (and probably now cmake since it was recently
introduced). Basically: add a new flag that the user (person compiling the library) could
use to enable/disable SOCK_CLOEXEC when running ./configure.
    
    In 3.5 the default behavior would be to not use SOCK_CLOEXEC regardless whether it's supported
or not (user can override default with the option). In 3.6 and later we'd make SOCK_CLOEXEC
the default and call it out as a potential issue as part of the release notes (disable with
the option in this case).
    
    2) it seems like we could do similar with a runtime property that the user could set in
code prior to running zookeeper_init that would be global in nature. e.g. zoo_deterministic_conn_order
    
    Again the defaults would be as specified in 1) above.
    
    Thoughts?
    



---

Mime
View raw message