Re: launchd daemon, spawning children?
site_archiver@lists.apple.com Delivered-To: Darwin-dev@lists.apple.com User-agent: Thunderbird 2.0.0.16 (Macintosh/20080707) Hi, You're right. Back at that time I wasn't aware of the difference between launching application, agent or daemon. You name it. I will look for a good tutorial, though Terry's suggestion contained a nice start. Ok. Then the dynamic launchd option is no good. Now thats a word. The user data is plain binary files. They needn't be in the users home, but they might lack group read properties (unless I set up an on-demand launchd daemon that sets them correctly). Seems I will (for now) stick to plain Unixy stuff. But I feel this was valuable information, my understanding of Agents and the issue of bootstrapping user environments got a lot better, thanks. Cheers, Mario _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... Damien Sorresso wrote: On Sep 26, 2008, at 12:52 AM, Mario Emmenlauer wrote: Now this was a misunderstanding (and its probably my fault because I didn't note it more explicit): I don't want to show GUI. Quoting You mentioned LSOpenApplication() as an alternative you investigated. So I concluded that you were interested in launching applications. Also, The rules of setuid(2) have evolved into a vastly complex morass with subtle variations on different platforms. Entire papers have been written about this behavior. - upon event, master dynamically sets up launchd plist for worker daemon for user (can a non-root process do that?) No. See above. Or I'm going back to Terry's suggestion of posix_spawning with the correct uid, which seems safe and sound for my case too. It all depends on what user data you need access to. If the needs are simple (i.e. you just need the path to the home directory so you can read and write state), then sure, posix_spawn(2) should do just fine for you. Just make sure that your master daemon properly reaps its children and all that jazz. In short, if you're doing just plain Unixy stuff, you should be okay. If you want to use any higher-level Mac OS X APIs, you might run into problems. This email sent to site_archiver@lists.apple.com
participants (1)
-
Mario Emmenlauer