• 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
Socket (demand) based launchd daemons
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Socket (demand) based launchd daemons


  • Subject: Socket (demand) based launchd daemons
  • From: Perry Smith <email@hidden>
  • Date: Wed, 23 Jan 2008 10:17:50 -0600

This question has come up for me before and I suspect it will again. The example this time is the web "server" that serves the Ruby "rdoc" documentation. You start it with "gem server". It has a few options like which port which has a default.

I have a launchd plist file that simply starts this up at boot. But, mostly so I can show off to my friends (if I had any :-), I'd like to start it up the first time I browse to that port.

The man page for launchd.plist says that the process has to "check in" using the launch(3) API. "man 3 launch" gives me back nothing. So I am lost as to what API's there are. But, even if I could find them, thats really just half the problem. The real problem is I'm looking for a way to transfer the file descriptor from launchd to the gem server using a script. (I can't modify gem just to do this -- well, I suppose I could but that only defers the problem until next time this comes up).

So, how is this done? Or... if I need to write some code, thats fine. But, where do I start?

Thank you,
Perry Smith

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Socket (demand) based launchd daemons
      • From: Dave Zarzycki <email@hidden>
  • Prev by Date: Re: IPv6 connection issues
  • Next by Date: Re: Socket (demand) based launchd daemons
  • Previous by thread: Re: How to eject a USB Hard drive
  • Next by thread: Re: Socket (demand) based launchd daemons
  • Index(es):
    • Date
    • Thread