On Sun, 2006-11-12 at 19:12 -0800, Sudharsan Rangarajan wrote: > Hello, > My device driver stores process specific info in its private > field(yes..weird!). On a fork the private field gets a new member (for > the child process). When a process exits, i wouldve to clean this up. > However given that the device drivers close is called only on teh last > close, I cant seem to figure out anyway. Any pointerS? Hi, you have a design problem here; I can send the fd I get from your device to another process (via the unix socket fd passing) and then exit myself. That has 2 issues for you 1) the other process has bad private data even if I don't exit 2) you won't get close notification on my process exit since there still is a process that his the same file open sounds like a case of "eh need to rethink this".. maybe if you had posted your sourcecode (need that under the gpl terms anyway) I could have given suggestions. -- if you want to mail me at work (you don't), use arjan (at) linux.intel.com Test the interaction between Linux and your BIOS via http://www.linuxfirmwarekit.org -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/