From owner-freebsd-arch@FreeBSD.ORG Fri Aug 12 16:27:35 2005 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 41C8516A41F for ; Fri, 12 Aug 2005 16:27:35 +0000 (GMT) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (arm132.internetdsl.tpnet.pl [83.17.198.132]) by mx1.FreeBSD.org (Postfix) with ESMTP id A04EC43D48 for ; Fri, 12 Aug 2005 16:27:34 +0000 (GMT) (envelope-from pjd@garage.freebsd.pl) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 20D4E52C2F; Fri, 12 Aug 2005 18:27:33 +0200 (CEST) Received: from localhost (dlq219.neoplus.adsl.tpnet.pl [83.24.46.219]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id B851952BC4; Fri, 12 Aug 2005 18:27:26 +0200 (CEST) Date: Fri, 12 Aug 2005 18:27:19 +0200 From: Pawel Jakub Dawidek To: m.ehinger@ltur.de Message-ID: <20050812162719.GA27362@garage.freebsd.pl> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LQksG6bCIzRHxTLp" Content-Disposition: inline In-Reply-To: X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 7.0-CURRENT i386 User-Agent: mutt-ng devel (FreeBSD) X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: * X-Spam-Status: No, score=1.8 required=3.0 tests=RCVD_IN_NJABL_DUL, RCVD_IN_SORBS_DUL autolearn=no version=3.0.4 Cc: freebsd-arch@freebsd.org Subject: Re: sysctl_proc calls handler twice X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Aug 2005 16:27:35 -0000 --LQksG6bCIzRHxTLp Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Aug 11, 2005 at 06:12:14PM +0200, m.ehinger@ltur.de wrote: +> Hi, +>=20 +> can someone explain why a proc sysctl (add via SYSCTL_PROC or SYSCTL_ADD= _PROC) calls the handler twice if i read the sysctl only +> once? Is this the normal behaviour? Yes, AFAIR first call is done to find out how much memory should be allocated and second one is request for a real data. +> How can i prevent this? You can't, try to live with it. --=20 Pawel Jakub Dawidek http://www.wheel.pl pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --LQksG6bCIzRHxTLp Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (FreeBSD) iD8DBQFC/M3nForvXbEpPzQRAq9QAKDv+ark3mm5lkMwFRAFoWhKVCcKYwCfWAxm azNs8HzAnm+W9wlLaFD/mbk= =0VsD -----END PGP SIGNATURE----- --LQksG6bCIzRHxTLp--