[Twisted-Python] Two things in twisted.internet.process
Tommi Virtanen
tv at twistedmatrix.com
Mon Jul 29 03:26:07 MDT 2002
On Sun, Jul 28, 2002 at 03:19:39PM -0500, Matt Campbell wrote:
> 1. I noticed that when Process.__init__ prepares to execute the
> child process, it closes all fd's from 3 to 255. Is it possible
> for the child process to inherit open files with fd's greater than
> 255? I'm concerned that this could happen on busy servers, but
> this is one aspect of Unix about which I don't know much.
fcntl(fd, F_SETFD, FD_CLOEXEC). On _all_ fds
one does not want to share with children.
Make the kernel do the work, it's the only sane way.
--
tv@{{hq.yok.utu,havoc,gaeshido}.fi,{debian,wanderer}.org,stonesoft.com}
double a,b=4,c;main(){for(;++a<2e6;c-=(b=-b)/a++);printf("%f\n",c);}
More information about the Twisted-Python
mailing list