Date: Mon, 19 Dec 2005 08:57:07 -0700 (MST) From: "M. Warner Losh" <imp@bsdimp.com> To: hide_yama@jcom.home.ne.jp Cc: freebsd-drivers@freebsd.org Subject: Re: Close never called. (Open same device file from 2 Apps.) Message-ID: <20051219.085707.00459236.imp@bsdimp.com> In-Reply-To: <DFENKGMAOIJJBLCONJJPOEFMCDAA.hide_yama@jcom.home.ne.jp> References: <DFENKGMAOIJJBLCONJJPOEFMCDAA.hide_yama@jcom.home.ne.jp>
next in thread | previous in thread | raw e-mail | index | archive | help
In message: <DFENKGMAOIJJBLCONJJPOEFMCDAA.hide_yama@jcom.home.ne.jp> "hide_yama" <hide_yama@jcom.home.ne.jp> writes: : Hi everybody : : Now, I'm writing device driver on 5.4R. But it doesn't act that I : unexpected. : So, if you know the reason and the avoidance, please tell to me. : Work is as follows. : : 1) Open device file "/dev/mypci" by App1. : This App1 just calls open routine and sleep for a while in it's program. : : 2) Open and close the same device file by App2 befor App1 is expired. : App2 calls just open and close routines in it's program. : : I expect that App2 calls open and close routines, however App2 just calls : open, doesn't call close. : : Why isn't the close routine called? Because close is only called on the last close. : And are there any avoidance for this problem? D_TRACKCLOSE in d_flags will change the behavior. Warner
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051219.085707.00459236.imp>