• 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: launchd and fork/exec?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: launchd and fork/exec?


  • Subject: Re: launchd and fork/exec?
  • From: Brian Bergstrand <email@hidden>
  • Date: Wed, 24 May 2006 18:37:35 -0500

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On May 24, 2006, at 6:04 PM, Dave Zarzycki wrote:


On May 24, 2006, at 12:24 PM, Brian Bergstrand wrote:

I have a tool that loads a non-IOKit kext via executing kextload. For various reasons, using kextload directly from the launchd plist won't work (the tool does some pre and post processing).

Reading the launchd Getting Started doc I see:

"The only things that are strictly prohibited, however, are fork()/ exit() combinations (including indirect methods, such as the daemon (3) library call)."

I'm not forking a child of the tool, but of course my tool fork/ exec's kextload (and kextunload and possibly kextstat). When this happens, launchd starts spewing errors in system.log and re- spawning my tool.

Is there anything I can do to work around this? Or do I just have to live with the spurious errors/respawns?

That's not really what launchd was meant for,

Really? The mantra coming from Apple is use launchd for all startup needs. As StartupItems are going away and I have a need to load a non- IOKit kext at boot, launchd seems to be the only game in town.


but if you must, RunAtLoad is the flag you want to set to true and you want OnDemand also set to true (or not set at all).

OK, I'll try that. I have RunAtLoad set to true now, but OnDemand is set (explicitly) to false.


Thanks.


davez

-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (Darwin)

iD8DBQFEdO5EedHYW7bHtqIRAkDUAJ9tbPlQ/q/sXgXel50PeWY2swoHdQCguxiR
eXwuTLOdYqHs6LJt3afFysw=
=TjgB
-----END PGP SIGNATURE-----
_______________________________________________
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


References: 
 >launchd and fork/exec? (From: Brian Bergstrand <email@hidden>)
 >Re: launchd and fork/exec? (From: Dave Zarzycki <email@hidden>)

  • Prev by Date: Re: launchd and fork/exec?
  • Next by Date: Is there a way to determine what default options are passed to g++?
  • Previous by thread: Re: launchd and fork/exec?
  • Next by thread: Is there a way to determine what default options are passed to g++?
  • Index(es):
    • Date
    • Thread