Kyle,
you could be right, but, if I put the program name as first argument, it
doesn't work. Please note I launch the /usr/bin/hdiutil and not the shell.

  args = [NSArray arrayWithObjects:@"mount", @"-stdinpass", dmgPath, nil];
  [aTask setLaunchPath:@"/usr/bin/hdiutil"];

and this way it works all the time.


Regards
--
Leonardo


> Da: Kyle Sluder <kyle.slu...@gmail.com>
> Data: Sun, 14 Mar 2010 18:42:51 -0700
> A: "gMail.com" <mac.iphone....@gmail.com>
> Cc: Gwynne Raskind <gwy...@darkrainfall.org>, <cocoa-dev@lists.apple.com>
> Oggetto: Re: mount dmg disk
> 
> On Sun, Mar 14, 2010 at 1:41 PM, gMail.com <mac.iphone....@gmail.com> wrote:
>> I had to modify just one thing, then it worked: since we invoke directly
>> hdiutil, I removed "hdiutil" from the args, so now it looks like:
> 
> This is incorrect. Unix convention requires the program name be the
> first argument.
> 
> Remember, NSTask is *NOT* like entering a command at the shell prompt.
> 
> --Kyle Sluder


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to