• 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
-[NSSharedWorkspace openFile:]: Application exits with status 255
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

-[NSSharedWorkspace openFile:]: Application exits with status 255


  • Subject: -[NSSharedWorkspace openFile:]: Application exits with status 255
  • From: Sidney San Martín <email@hidden>
  • Date: Wed, 22 Apr 2009 15:04:01 -0400

I'm running into an issue that's above my skill level and could really
use some guidance. My application has an SUID-root update utility (I
know that's unusual, but it's an internal application that needs to be
able to update itself even when the logged-in user isn't privileged)
stored inside the application bundle. It downloads the update, sends a
message back to the parent application that it's OK to quit, moves the
new copy into place, and launches it.

That last bit is giving me issues. I'm using -[NSWorkspace openFile:]
to do the actual relaunching. It returns YES, but my application
doesn't launch and "com.apple.launchd[152]
([0x0-0xb80b8].com.mycompany.MyApplication[3836]) Exited with exit
code: 255" appears in the Console.

I noticed that at this point, if I use open (on the command line) to
try to launch my (updated) application, it works. However, if I sudo
open, it prints "LSOpenFromURLSpec() failed with error -10810 for the
file ...". -10810 translates to "Unexpected internal error".

If I touch the application bundle, open starts working as me and as
root. Following this thread, I tried calling utimes() from my helper
before openFile:, but run into the same condition. I've also tried
LSRegisterURL() with no change. Can anyone give me a hint as to what's
happening here? I'm lost.
_______________________________________________

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: -[NSSharedWorkspace openFile:]: Application exits with status 255
      • From: Sidney San Martín <email@hidden>
    • Re: -[NSSharedWorkspace openFile:]: Application exits with status 255
      • From: Kyle Sluder <email@hidden>
  • Prev by Date: Re: objc_exception_throw prior to launching nib file
  • Next by Date: Re: file extensions and Mime Type
  • Previous by thread: Re: objc_exception_throw prior to launching nib file
  • Next by thread: Re: -[NSSharedWorkspace openFile:]: Application exits with status 255
  • Index(es):
    • Date
    • Thread