sysctl_proc calls handler twice
Pawel Jakub Dawidek
pjd at FreeBSD.org
Fri Aug 12 16:27:35 GMT 2005
On Thu, Aug 11, 2005 at 06:12:14PM +0200, m.ehinger at ltur.de wrote:
+> Hi,
+>
+> 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.
--
Pawel Jakub Dawidek http://www.wheel.pl
pjd at FreeBSD.org http://www.FreeBSD.org
FreeBSD committer Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-arch/attachments/20050812/47b90fc3/attachment.bin
More information about the freebsd-arch
mailing list