Re: sysctl_proc calls handler twice

m.ehinger_at_ltur.de
Date: 08/15/05

  • Next message: Meital Doe: "McDonald's bomber jÄiled"
    To: Pawel Jakub Dawidek <pjd@FreeBSD.org>
    Date: Mon, 15 Aug 2005 08:15:00 +0200
    
    

    thanks,

    meanwhile i found out that sysctlbyname(3) calls it only once.

    maik

                                                                                                                                        
                 Pawel Jakub Dawidek <pjd@FreeBSD.org>
                                                                                                                                        
                 12.08.2005 18:27 An
                                                                   m.ehinger@ltur.de
                                                                                                                                  Kopie
                                                                   freebsd-arch@freebsd.org
                                                                                                                                  Thema
                                                                   Re: sysctl_proc calls handler twice
                                                                                                                                        
                                                                                                                                        
                                                                                                                                        
                                                                                                                                        
                                                                                                                                        
                                                                                                                                        

    On Thu, Aug 11, 2005 at 06:12:14PM +0200, m.ehinger@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@FreeBSD.org                           http://www.FreeBSD.org
    FreeBSD committer                         Am I Evil? Yes, I Am!
    _______________________________________________
    freebsd-arch@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-arch
    To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"
    

  • Next message: Meital Doe: "McDonald's bomber jÄiled"

    Relevant Pages

    • Re: sysctl_proc calls handler twice
      ... +> can someone explain why a proc sysctl calls the handler twice if i read the sysctl only ... allocated and second one is request for a real data. ...
      (freebsd-arch)
    • sysctl_proc calls handler twice
      ... can someone explain why a proc sysctl calls the handler twice if i read the sysctl only ... Is this the normal behaviour? ... To unsubscribe, ...
      (freebsd-arch)