Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!usc!snorkelwacker.mit.edu!bloom-beacon!LARRY.MCRCIM.MCGILL.EDU!mouse From: mouse@LARRY.MCRCIM.MCGILL.EDU Newsgroups: comp.windows.x Subject: Re: Number of connections to server Message-ID: <9012190448.AA02434@Larry.McRCIM.McGill.EDU> Date: 19 Dec 90 04:48:07 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 40 > Under Sun OS 4.1, there is a way to increase the number of > descriptors a program has opened from the soft limit of 64 to the > real hard limit of 128. Right now the Xserver uses the soft limit, > could somebody let me know where such an allocation is done in the > actual MIT X server? (Bet you thought everybody'd forgotten! :-) Look in os/4.2bsd/connection.c... void CreateWellKnownSockets() { ... #ifdef hpux lastfdesc = _NFILE - 2; #else lastfdesc = getdtablesize() - 2; #endif /* hpux */ if (lastfdesc > MAXSOCKS) { lastfdesc = MAXSOCKS; if (debug_conns) ErrorF( "GOT TO END OF SOCKETS %d\n", MAXSOCKS); } WellKnownConnections = 0; (The above is roughly correct, but may not be precise, as it is regenerated from a locally-modified version. The essence for these purposes is correct.) Just before the assignment to lastfdesc would probably be a reasonable place to raise the soft limit to the hard limit. der Mouse old: mcgill-vision!mouse new: mouse@larry.mcrcim.mcgill.edu