Small fix to whoisd.pl
Dale S. Johnson
Thu May 4 23:37:36 CEST 1995
Geert Jan, > On Wed, 3 May 1995 14:56:52 -0400 (EDT) Laurent Joncheray wrote: > > It is an old issue but... > > why don't you port whoisd to be called from [x]inetd. So you > > won't need any networking hack. It has been like that on radb.ra.net, > > and it seems to be fine. > > Laurent > > PS: lot of advantages: do not need to run as root, IP filtering, logging, > > I just did some measurements; I did a 10 queries to the standard whois > service, and one running via inetd, and found: > direct: 25.25s > inetd: 5.00s > direct whois is 5 times faster. > > This is averaged over a number of measurements on the same machine, > and local (2 hops ether) network. > > This is probably why httpd servers want to run standalone, instead of > via inetd. Note that I needed to hack whoisd to make it work under > inetd (David whispered something about a fix being available from > Merit, but I didn't have it so I butchered the code to do this; > I'm not a perl programmer) > > The big difference is probably caused by perl initializing, as it > 'compiles' the perl script every time it starts; some debug-prints > made that quite clear. Depending on what the nature of this initialization is, there may be a chance here to use the world's most bizarre sanctioned hack. If the initialization is reading info from files that changes occasionally, then only the current solutions will work. If it is just doing internal table building or such, consider my all-time favorite bizarre command: DUMP (p 139, Programming Perl) This function causes an immediate core dump. Primarily this is so that you can use the undump program to turn your core dump into an executable binary after having initialized all your variables at the beginning of the program. ...Think of it as a goto with an intervening core dumpand reincaration. --Anonymous -------- Logged at Thu May 4 23:53:07 MET DST 1995 ---------
[ rr-impl Archive ]