Hi! Is there any way of telling  reactor.spawnProcess() not to close
all open file descriptors? I've tried passing the following as
``childFDs``:

  childFDs = {0: "w", 1: "r", 2: "r"}
  max_fds = resource.getrlimit(resource.RLIMIT_NOFILE)[1] + 1
  for i in xrange(3, max_fds):
    childFDs[i] = i

but of course it doesn't work, because most of those file descriptors
are not open, and then the call to clear the close-on-exec flag fails.

In case there's no way of avoiding the close, I could try writing a
patch for reactor.spawnProcess(): Something like adding an extra
keyword argument to enable or disable the close, for instance. Would
such a patch have any chance of being accepted?

Thanks,

Carlos

_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Reply via email to