kqueue and filenames



Hi,
I'm using kqueue for detecting file-events; for additional information I add a struct to udata, when registering an event with kevent.
When I delete an event, will be udata deleted too, or do I have to manage the memory for the structs with an own implementation?

kevent is triggered when a file is renamed. How do I get the new name?
Is there an extra function? In the moment, I see only the possibility by searching the filesystem(folder) for a new name.

Thanks for every hint.

Matthias
Moenchengladbach, Germany
_______________________________________________
freebsd-questions@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: kqueue and filenames
    ... I add a struct to udata, when registering an event with kevent. ... When I delete an event, will be udata deleted too, or do I have to manage the memory for the structs with an own implementation? ... I think in principle it is impossible to get the file name by file descriptor alone. ...
    (freebsd-questions)
  • Re: [take2 1/4] kevent: core files.
    ... It's weird to hide them in a struct. ... I think the current preference is not to have a lock per bucket. ... which can not be done (at least when kevent was initially ... call callback ...
    (Linux-Kernel)
  • Re: [take16 1/4] kevent: Core files.
    ... +struct kevent_user ... These structure names get a little dicey (kevent, kevent_user, ukevent, ... + * Initialize mmap ring buffer. ...
    (Linux-Kernel)
  • Re: [take2 1/4] kevent: core files.
    ... It's weird to hide them in a struct. ... I think the current preference is not to have a lock per bucket. ... Then you'd also have one pointer per kevent instead of three. ... Hmm, the only caller that provides a callback is using it to call ...
    (Linux-Kernel)
  • Re: Managing userland data pointers in kqueue/kevent
    ... specified object (e.g. a file descriptor) and will know to drop the associated ... When the eventable object's reference ... count drops to zero in userland, then the kevent should be deleted, either via ... the kernel's udata pointer effectively holds the only reference to ...
    (freebsd-hackers)