• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Closing an IOUserClient
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Closing an IOUserClient


  • Subject: Re: Closing an IOUserClient
  • From: "Duane Murphy" <email@hidden>
  • Date: Tue, 18 Dec 2007 22:09:36 -0800

I've been experimenting with tracking when to close the IOUserClient.
The problem is now that I don't know the proper way to close the
IOUserClient from it's provider.

I'm calling client->terminate( kIOServiceTerminate |
kIOServiceSynchronous ). The connection to the provider is being closed,
but the IOUserClient instance is not being removed. That is I cannot
unload the kext because there are still instances of the IOUserClient class.

What is the correct way to remove an IOUserClient instance from a provider?

--- At Tue, 18 Dec 2007 18:29:26 -0800, Duane Murphy wrote:

>I have an IOUserClient subclass whose provider is a file system filter.
>When the file system is unloaded/unmounted the user client remains
>connected. This causes Disk Utility and friends to be unhappy operating
>on the disk (ie partitioning).
>
>I would have expected the terminate() set of calls to cause the user
>client to unload. The UserClient is not being called at all during
unmounting.
>
>Further testing shows that unmounting a file system doesn't actually
>remove the kext (it's above the partition layer). My suspicion is that
>unmounting a file system is much different than unloading the kext.
>
>More testing shows that unloading the kext does cause the IOUserClient
>to be terminated and closed.
>
>Unfortunately, Disk Utility and friends can't operate on the disk until
>the IOUserClient instance is closed. I get a "Resource Busy" error.
>
>How should I handle this situation? I figure I can track IOUserClient
>instances, but how would I know that I need to disconnect them?
>
>Thanks for the tips,

 ...Duane

 _______________________________________________
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

  • Follow-Ups:
    • Re: Closing an IOUserClient
      • From: Garth Cummings <email@hidden>
References: 
 >Closing an IOUserClient (From: "Duane Murphy" <email@hidden>)

  • Prev by Date: Re: HowTo: catch a signal and get a CrashLog too (Leopard)
  • Next by Date: Re: Closing an IOUserClient
  • Previous by thread: Closing an IOUserClient
  • Next by thread: Re: Closing an IOUserClient
  • Index(es):
    • Date
    • Thread