site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:subject :mime-version:date:references:x-mailer; bh=PCaQH2lvCXCBi9qaUS74QmDLc2Oc2oJT+8JVemgsVuM=; b=lw0mGdxQCS0XPDSDbONmGRUnlLiVI8Cn5I4bgw5k4IAjvbOnalWt6IXuHYR053ZGuf X0pHM0ba8GKedmvzSRhzg73hbUUMBN/2RlkKNkQlY2gpDjKYalivKcwvIUnZHMLHKpWT +6anwdaZzf8FCdHMFGbzo6RsSQbo/LyFjZAVU= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:in-reply-to:content-type :content-transfer-encoding:subject:mime-version:date:references :x-mailer; b=enpOmbI7ouIQdGrU1TNb95lIp4fzuvKmvR0Frt3oy2lpAn6D2urYcjzODRsISk4Vlp mhHS25Rv/lfmML9jyFVeZEln21qc2ZUfSYvHOJZ33ndTpZfZ556oQUCrDMwFKud6fNo1 XLHG6en0betp1KqO/BZkgQc+G6yrhEszwX97k= On Feb 24, 2009, at 3:55 PM, Rakesh Singhal wrote: Thanks a lot. Sorry for trouble. My answers are as follows: 1. Child process is not going to run as root. My intention is child to run as user. I am setting the uid and gid of current user using setuid(), seteuid(), setgid() and setegid() APIs. 3. Before launching the GUI, I am checking that if any user is logged in or not. If not then I do not launch. What about when multiple users are logged in? 4. I want to start my GUI app through a background app. I am using daemon app for this purpose and for some other functionality also. I choose daemon cause it does not get terminated when user logs out, that I need for other functionality. To launch GUI, I can use launchAgents then I will need to use both daemon and agents. But now I have one query that when user logs out the agents will be terminated and when user logs in again then? _______________________________________________ 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...
From the context of the daemon, how it is going to figure out who the current user is?
Your daemon needs to communicate with one or more agents, which in turn perform the operation, such as launching a GUI app, on the daemon's behalf. The daemon and the agents (as there may 0 to n agents running at any time, and they come and go when users log in and out) need to work together to figure out which user should be interacted with. Alternately, you could outsource this work to a more experienced Mac developer. This email sent to site_archiver@lists.apple.com