• 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: NSTask and 10.9 [SOLVED]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTask and 10.9 [SOLVED]


  • Subject: Re: NSTask and 10.9 [SOLVED]
  • From: koko <email@hidden>
  • Date: Wed, 27 Nov 2013 08:59:55 -0700

NSString *scriptPath = [[NSBundle mainBundle] pathForResource:@"DeleteHidden" ofType:nil];

NSTask *task;
task = [[NSTask alloc] init];
[task setLaunchPath:scriptPath];

The script DeleteHidden had line endings of <cf,lf> which caused an exception on 10.9
removing the <cr> via a hex editor resolved the 10.9 issue

Thanks to all for the cycles.

-koko




On Nov 26, 2013, at 11:04 AM, Kyle Sluder <email@hidden> wrote:

> On Tue, Nov 26, 2013, at 09:37 AM, koko wrote:
>>
>> On Nov 26, 2013, at 10:26 AM, Kyle Sluder <email@hidden> wrote:
>>
>>> Error 2 is ENOENT. The path you passed to -setLaunchPath: does not exist.
>>>
>>
>>
>> Not possible as
>>
>> [task setLaunchPath:rootScriptPath];
>>
>> where rootScriptPath is NSString *rootScriptPath = [[NSBundle mainBundle]
>> pathForResource:@"DeleteHiddenRoot" ofType:nil];
>
> Well, you never actually proved that this method returns something other
> than nil. But we'll assume you verified that even passing a hardcoded,
> known-good path to -setLaunchPath: causes the same symptoms.
>
>>
>> so do you know if Mavericks disallows NSTask access to the App Bundle?
>>
>
> Perhaps.
>
> Starting in Mavericks, all the binaries within a signed bundle must be
> themselves signed before the bundle is signed, because their signatures
> form part of the bundle's designated requirement. I've only seen this
> discussed in the context of frameworks, but I would not be surprised if
> it also applied to scripts or other tasks launched via posix_spawn.
>
> For more details, see Craig Hockenberry's blog post:
> http://furbo.org/2013/10/17/code-signing-and-mavericks/
>
> --Kyle Sluder
>

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden


  • Follow-Ups:
    • Re: NSTask and 10.9 [SOLVED]
      • From: Kyle Sluder <email@hidden>
References: 
 >NSTask and 10.9 (From: koko <email@hidden>)
 >Re: NSTask and 10.9 (From: Kyle Sluder <email@hidden>)
 >Re: NSTask and 10.9 (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: Can't remove autoresizing constraints?
  • Next by Date: Re: NSTask and 10.9 [SOLVED]
  • Previous by thread: Re: NSTask and 10.9
  • Next by thread: Re: NSTask and 10.9 [SOLVED]
  • Index(es):
    • Date
    • Thread