joshmarshall / jsonrpclib

A Python JSON-RPC over HTTP that mirrors xmlrpclib syntax.
Other
447 stars 144 forks source link

fcntl question #22

Open jw opened 11 years ago

jw commented 11 years ago

Hello Josh,

In the SimpleJSONRPCServer is see this code:

    if fcntl is not None and hasattr(fcntl, 'FD_CLOEXEC'):
        flags = fcntl.fcntl(self.fileno(), fcntl.F_GETFD)
        flags |= fcntl.FD_CLOEXEC
        fcntl.fcntl(self.fileno(), fcntl.F_SETFD, flags)

What should it do? Why are we forcing close-on-exec on the descriptor of the socket?

Thanks and regards, Jan