From owner-freebsd-hackers Tue Nov 7 17:30:35 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from linus.dvart.com (linus.dvart.com [64.79.2.3]) by hub.freebsd.org (Postfix) with ESMTP id CB0C437B479 for ; Tue, 7 Nov 2000 17:30:30 -0800 (PST) Received: from dvart.com ([192.168.100.141]) by linus.dvart.com (8.9.3/8.9.3) with ESMTP id RAA28809 for ; Tue, 7 Nov 2000 17:30:29 -0800 Message-ID: <3A08ACB5.FD22CE8@dvart.com> Date: Tue, 07 Nov 2000 17:30:29 -0800 From: bruno schwander X-Mailer: Mozilla 4.73 [en] (X11; I; FreeBSD 4.1-RELEASE i386) X-Accept-Language: en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Subject: close call in a device ? Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hello everybody, I am writing a pseudo-device driver (as a kernel module) that needs to be opened in write mode by several processes. The problem I am having is that I do get all the "open" calls when a process opens the device, and I am able to process data written, etc. on a per-process basis; however, when a process closes the device, I do not get a "close" call for each process closing the device. I instead get a close only on the last process closing the device. This is a problem since I need to allocate/free resources for each process accessing the device, at the time a process closes the device. Is there a way to make sure my driver gets all "close" calls ? I could possibly get around this by using timeouts, but the unpredictability of the accessing processes may make this very difficult and suboptimal, so getting the "close" calls would be way better Thank you all for any information on this bruno -- ########################################################################### Bruno Schwander Senior Software Engineer Worldgate Communications, Inc email: bschwand@dvart.com ############################################################################ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message