• 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
NSWorkspace from a CGI in Panther?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSWorkspace from a CGI in Panther?


  • Subject: NSWorkspace from a CGI in Panther?
  • From: Mike Hamburg <email@hidden>
  • Date: Wed, 19 Nov 2003 23:14:47 -0500

I wrote a CGI script, geticon, which uses NSWorkspace to cache file icons for an index.pl script. Under Jaguar, this meant that the script wouldn't work if nobody was logged in, and also caused random permissions problems. I'm logged in pretty much all the time, and I solved the permissions problems by running it setuid (it switches back to user www after calling [NSWorkspace sharedWorkspace];). This is a kludge as it stands.

Now, in Panther, the script refuses to run as a CGI; calling sharedWorkspace gives a SIGBUS. Any user can run geticon from the command line whether or not they are logged in or can log in; any user can run it over SSH. But when it's launched by Apache 2, it dies. Presumably this has to do with the environment that it runs in, and I've worked around it temporarily by running a "geticon server" that listens for icons to thumbnail on a named pipe. How do I have to set up that environment to avoid this kludge?

cheers,
Mike
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: cocoa-dev digest, Vol 2 #3239 - 16 msgs
  • Next by Date: Using ssh with the NSTask class
  • Previous by thread: Re: cocoa-dev digest, Vol 2 #3239 - 16 msgs
  • Next by thread: Using ssh with the NSTask class
  • Index(es):
    • Date
    • Thread