From owner-cvs-sbin Sun Mar 2 11:51:37 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id LAA28112 for cvs-sbin-outgoing; Sun, 2 Mar 1997 11:51:37 -0800 (PST) Received: from rover.village.org (rover.village.org [204.144.255.49]) by freefall.freebsd.org (8.8.5/8.8.5) with SMTP id LAA28011; Sun, 2 Mar 1997 11:50:23 -0800 (PST) Received: from rover.village.org [127.0.0.1] by rover.village.org with esmtp (Exim 0.56 #1) id E0w1HH0-0005fW-00; Sun, 2 Mar 1997 12:50:18 -0700 To: Bill Fenner Subject: Re: cvs commit: src/sbin/ping ping.c ping.8 Cc: CVS-committers@freefall.freebsd.org, cvs-all@freefall.freebsd.org, cvs-sbin@freefall.freebsd.org In-reply-to: Your message of "Sun, 02 Mar 1997 11:36:07 PST." <97Mar2.113620pst.177476@crevenia.parc.xerox.com> References: <97Mar2.113620pst.177476@crevenia.parc.xerox.com> Date: Sun, 02 Mar 1997 12:50:18 -0700 From: Warner Losh Message-Id: Sender: owner-cvs-sbin@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk In message <97Mar2.113620pst.177476@crevenia.parc.xerox.com> Bill Fenner writes: : Is it a good idea to call getuid() for each packet? Wouldn't it make : more sense to cache its value, since it's not going to change? (Perhaps : at the same time as we setuid(getuid())?) I don't think that it matters enough to be worth the extra effort at optimizing. getuid() is a cheap system call, and we only call getuid() when verbose is true. And then we should be doing that only once a second. However, in less time than it has taken me to whine about this, I've added it to my local copy and it compiles.... Warner