Date: Tue, 20 Dec 2005 22:37:08 +0900 From: "hide_yama" <hide_yama@jcom.home.ne.jp> To: <freebsd-drivers@freebsd.org> Subject: RE: Close never called. (Open same device file from 2 Apps.) Message-ID: <DFENKGMAOIJJBLCONJJPAEGHCDAA.hide_yama@jcom.home.ne.jp> In-Reply-To: <20051219.085707.00459236.imp@bsdimp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
I am most grateful to you. I add flag like as follows. static struct cdevsw mypci_cdevsw = { .d_version = D_VERSION, .d_flags = D_NEEDGIANT|D_TRACKCLOSE, ^^^^^^^^^^^^^^ .d_open = mypci_open, .d_close = mypci_close, .d_read = mypci_read, .d_write = mypci_write, .d_ioctl = mypci_ioctl, .d_name = "mypci", }; Then the program runs as I expected. Close routine has called!!! Thanks a lot!!!!! --- Chaki > : 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?DFENKGMAOIJJBLCONJJPAEGHCDAA.hide_yama>