Re: [CFR] reflect resolv.conf update to running application

From: Hajimu UMEMOTO (ume_at_freebsd.org)
Date: 08/21/05

  • Next message: Alexander Leidinger: "Re: [CFR] reflect resolv.conf update to running application"
    Date: Sun, 21 Aug 2005 19:27:07 +0900
    To: Alexander Leidinger <Alexander@Leidinger.net>
    
    

    Hi,

    >>>>> On Sun, 21 Aug 2005 11:54:54 +0200
    >>>>> Alexander Leidinger <Alexander@Leidinger.net> said:

    Alexander> Can kqueue be used instead of polling?

    It may be able to use kqueue. However, I'm not sure how kevent() is
    cheap than stat(). It requires holding a file descriptor for
    monitoring change of resolv.conf. The logic will be slightly
    complicate, and it may cause memory leak. So, unless there is
    significant advantage to use kqueue, stat() is better here, IMHO.

    Sincerely,

    --
    Hajimu UMEMOTO @ Internet Mutual Aid Society Yokohama, Japan
    ume@mahoroba.org  ume@{,jp.}FreeBSD.org
    http://www.imasy.org/~ume/
    _______________________________________________
    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: Alexander Leidinger: "Re: [CFR] reflect resolv.conf update to running application"

    Relevant Pages

    • Re: [CFR] reflect resolv.conf update to running application
      ... > Alexander> Can kqueue be used instead of polling? ... > cheap than stat(). ... It requires holding a file descriptor for ... From a high level perspective, kevent() only ...
      (freebsd-arch)
    • Re: libc_r kqueue fd leak
      ... This fixes the kqueue leak. ... > After a little more research it seems the kernel fix is already documented ... and so _stat provided useless information. ... You'd better spend your syscall calling kevent and getting a few ...
      (freebsd-stable)
    • Re: [take12 0/3] kevent: Generic event handling mechanism.
      ... kevent is called. ... Word "polling" really confuses me here, ... should be returned (as far as I recall they are always added into kqueue in ... API in my program. ...
      (Linux-Kernel)
    • Re: [take22 0/4] kevent: Generic event handling mechanism.
      ... compared to kqueue in kernelspace, or just about what structure is being ... it was some kind of a joke to 'not rewrite *bsd from scratch ... and use kqueue in Linux kernel as is'. ... *BSD kevent ...
      (Linux-Kernel)
    • Stopping a kqueue
      ... I tried asking this in comp.lang.c and comp.lang.c++ but in neither place had anyone ever heard of kqueue or kevent so I'm hoping I might have more luck here. ... I've got some code which monitors a file by way of the kqueue/kevent mechanism but I'm having trouble getting it to shut down cleanly. ... As far as I can see, the only way to get it to stop is to set "watcherRunning" to false and then actually make a change to the file in order to trigger a kevent and unblock the thread! ...
      (comp.unix.bsd.freebsd.misc)