On Mon, Jun 28, 2010 at 15:30, James Y Knight wrote:
> Or, if just listdir("/proc/%d/fd/" % getpid()). If that doesn't fail
> (aka /proc/pid/fd actually exists and is mounted on this OS) then only
> close the listed fds. That'll be much much faster.
I just did that, James (http://twistedmatrix.co
On Jun 28, 2010, at 9:03 AM, Itamar Turner-Trauring wrote:
> On Mon, 2010-06-28 at 13:21 +0100, Carlos Valiente wrote:
>> I wanted to skip the calls to close()
>> -- 1024 of them, in my case -- because, according to strace(1),
>> that
>> takes about 100 ms (and I'd like to save those millisec
On Mon, 2010-06-28 at 13:21 +0100, Carlos Valiente wrote:
> I wanted to skip the calls to close()
> -- 1024 of them, in my case -- because, according to strace(1), that
> takes about 100 ms (and I'd like to save those milliseconds).
Ah, I see. So the issue is performance. If you do file a ticket
On Mon, Jun 28, 2010 at 13:04, Itamar Turner-Trauring
wrote:
> On Mon, 2010-06-28 at 12:52 +0100, Carlos Valiente wrote:
>> Hi! Is there any way of telling reactor.spawnProcess() not to close
>> all open file descriptors?
>
> My Unix knowledge is weak, but - couldn't you pass in duplicate fds, so
On Mon, 2010-06-28 at 12:52 +0100, Carlos Valiente wrote:
> Hi! Is there any way of telling reactor.spawnProcess() not to close
> all open file descriptors?
My Unix knowledge is weak, but - couldn't you pass in duplicate fds, so
that when they are closed it wouldn't affect the originals?
__