do shell script "diskutil unmount diskXXX"

Joined
Nov 28, 2006
Messages
2
Reaction score
0
Don't know whether someone would like to give this a whirl, but it has been posted on Apple AS & UNIX discussions without a reply (except for others reinforcing the question).

Bear with me, as this does have to do with AS.

If, in Terminal, one does the command
diskutil mount diskXXX
or
diskutil unmount diskXXX

the response is very quick, ~1 second.

However, if this is done in AS editor as "do shell script", the unmount (while reliable) takes upwards of 20 seconds on my fast machine, whereas the mount time is very quick.

According to an AS Discussions respondent, the same sort of delay can be expected when using an obj-C application.

Still another AS Discussions respondent had queried Mac Fix It on the reason for this and was told that it probably had to do with preparation of the disk for unmounting -- but then, why wouldn't the same thing happen directly in Terminal?

In fact, using both approaches, I tried to unmount a disk with an open application and in both cases got a "disk failed to unmount" response (meaning that Terminal
is doing some checking, at least).

A workaround would be great, but an understanding of what's going on would be useful. Any ideas?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top