From owner-freebsd-commit Mon Jul 17 22:07:48 1995 Return-Path: commit-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id WAA09146 for commit-outgoing; Mon, 17 Jul 1995 22:07:48 -0700 Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id WAA09129 for cvs-usrbin-outgoing; Mon, 17 Jul 1995 22:07:23 -0700 Received: (from peter@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id WAA09104 ; Mon, 17 Jul 1995 22:07:03 -0700 Date: Mon, 17 Jul 1995 22:07:03 -0700 From: Peter Wemm Message-Id: <199507180507.WAA09104@freefall.cdrom.com> To: CVS-commiters, cvs-usrbin Subject: cvs commit: src/usr.bin/w w.c Sender: commit-owner@FreeBSD.org Precedence: bulk peter 95/07/17 22:07:03 Modified: usr.bin/w w.c Log: When 'w' finds an IP address in the ut_host field, it attempts to do a gethostbyname() on it. That can take a long time... (especially if the reason the IP address is in there in the first place is because login/rlogind/telnetd couldn't find it either....) This patch reduces the gethostbyaddr lookup time to 2 seconds, the idea being that if the local nameserver knows the answer, it'll answer within that time, otherwise we dont care... :-) This change doesn't do anything about whether or not w should do this in the first place, but at least it will make the current behavior less painful. Reviewed by: David Greenman