• 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: hdiutil problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: hdiutil problem


  • Subject: Re: hdiutil problem
  • From: Axel Luttgens <email@hidden>
  • Date: Sun, 18 May 2008 11:14:32 +0200


On 15 mai 08, at 01:34, Luther Fuller wrote:

This script hangs at the last line in Leopard (it worked OK in Tiger) ...

set imageAlias to alias "Work_Files:Backup - 14 May 2008.sparseimage"
set imagePath to quoted form of (POSIX path of imageAlias)
set response to (do shell script "hdiutil burn " & imagePath & " - sizequery")


Activity Monitor indicates that hdiutil is running and taking 100% CPU and never finishing.

So, I go to Terminal and do this with no problem ...

Last login: Wed May 14 17:55:04 on ttys000
luther-fullers-mac-mini:~ lutherfuller$ hdiutil burn /Volumes/ Work_Files/Backup\ -\ 14\ May\ 2008.sparseimage -sizequery
0x00000000008C1000 (9179136) sectors in image, 0x00000000008C1020 (9179168) sectors needed for burn


Activity Monitor indicates that hdiutil and bash are still running, but I did get a valid response.

So, there is still a problem, even in Terminal...

Who knows what is happening here?

Strangely, when run in Terminal, hdiutil burn <image> -sizequery waits for an INT signal (i.e. for the user to type ^C).

The same happens when the above is run from "do shell script"; this would just be a (rather big) inconvenience, as there are ways to send the expected signal, wouldn't there be another phenomenon: hdiutil seems to forget to write to stdout...

More generally, hdiutil seems to incorrectly handle I/O; just try this in Terminal:
hdiutil burn <image> -sizequery &>/tmp/XYZ
and type ^C after a while. File /tmp/XYZ gets created, but desperately remains empty.


Looks like some bug is at work somewhere... ;-)

Bug for bug, I found another one: the -debug option restores I/O capability, as expected spits out a lot of info, and very courteously throws an error that halts the command's execution (thus alleviating the need to send an INT).

As a result, there is a workaround:

do shell script "hdiutil burn " & imagePath & " -sizequery -debug | egrep 'sectors (in image|needed for burn)'; echo"

(the echo command is just there to quickly avoid a non-zero return code)

I haven't yet had the opportunity to check with Tiger; is hdiutil's behavior more consistent there? If yes, filing a bug report could be a good idea.

HTH,
Axel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
  • Follow-Ups:
    • consolidate lists
      • From: Hudson Barton <email@hidden>
References: 
 >hdiutil problem (From: Luther Fuller <email@hidden>)

  • Prev by Date: Running a script library from within FileMaker Pro 6
  • Next by Date: consolidate lists
  • Previous by thread: hdiutil problem
  • Next by thread: consolidate lists
  • Index(es):
    • Date
    • Thread