Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Aug 2005 18:27:19 +0200
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        m.ehinger@ltur.de
Cc:        freebsd-arch@freebsd.org
Subject:   Re: sysctl_proc calls handler twice
Message-ID:  <20050812162719.GA27362@garage.freebsd.pl>
In-Reply-To: <OF2BE95689.E0462F42-ONC125705A.0057F8BA-C125705A.00590EEC@gateway-inter.net>
References:  <OF2BE95689.E0462F42-ONC125705A.0057F8BA-C125705A.00590EEC@gateway-inter.net>

next in thread | previous in thread | raw e-mail | index | archive | help

--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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050812162719.GA27362>