Re: ok, dumb question, but ...
Re: ok, dumb question, but ...
- Subject: Re: ok, dumb question, but ...
- From: Dave Zarzycki <email@hidden>
- Date: Tue, 4 Apr 2006 06:11:50 -0700
Oh, and to answer your other question, the ident field is context
sensitive. To properly interpret it, you must look at the filter type
(EVFILT_READ, EVFILT_WRITE, EVFILT_VNODE, EVFILT_PROC,
EVFILT_SIGNAL, ...).
davez
On Apr 4, 2006, at 6:09 AM, Dave Zarzycki wrote:
There are no officially condoned ways of doing what you want. There
are debug tools such as lsof that do it, but they grope around
kernel data structures directly.
The Unix philosophy is that if you want such a thing in your
program, maintain a table that is updated at open()/close() in your
program. :-P
Good luck,
davez
On Apr 4, 2006, at 3:38 AM, email@hidden wrote:
Dave,
The ident field is something you passed into the kqueue in the
first place. You should, with your data structures, be able to map
it back to whatever resource you allocated.
After a brief hiatus, i'm back to playing with kqueue / kevent.
I've a simple question, though ... from the kevent.ident field,
how to I determine the actual resource that this references
(filename, socket, etc.)?
Oh I understand this ... if I added it, I should know what I
added. I likely phrased my question wrong -- is there a way I can
map the ident field back into whatever it is e.g. is there a way I
can map a FD to a filename (if the ident field is really an FD)? I
thought I remembered old C stuff to do this, but ...
Regards,
John, "I used to read books, but ..." -- Pink Floyd, "Not Now John"
Falling You - exploring the beauty of voice and sound
http://www.fallingyou.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden