views:

245

answers:

1

I'm trying to unmount a WebDAV volume (mounted with FSMountServerVolumeSync()) using either FSUnmountVolumeSync() or FSEjectVolumeSync(). Thus far I've been unable to get either of them to reliably unmount the volume without blocking for more than 20 seconds. While they're blocking I can see webdavfs_agent complaining in Console.app that the WebDAV server is not responding. They never error out, though, and the WebDAV volume has always been unmounted afterward. It's as if I've missed a step.

Am I going about it the wrong way, or is this just an OS X quirk/bug? The documentation is pretty vague as far as what the differences between these two methods are, or any prerequisites to their being called.

+1  A: 

You could try FSEjectVolumeAsync. This will call a function of yours back when it finishes ejecting the volume.

Peter Hosey
Thanks for your response. Unfortunately the problem (for me) isn't that it blocks my application, but rather just that it takes a long time. So when I want to shut down my application it takes 20+ seconds to do so.
Adam Preble