Re: launchd daemon, spawning children?
Re: launchd daemon, spawning children?
- Subject: Re: launchd daemon, spawning children?
- From: Mario Emmenlauer <email@hidden>
- Date: Fri, 26 Sep 2008 11:37:46 +0200
Hi,
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,
You're right. Back at that time I wasn't aware of the difference between
launching application, agent or daemon.
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.
You name it. I will look for a good tutorial, though Terry's suggestion
contained a nice start.
- upon event, master dynamically sets up launchd plist for worker
daemon for user (can a non-root process do that?)
No. See above.
Ok. Then the dynamic launchd option is no good.
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.
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 (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden