Re: Another approach to root user?
Re: Another approach to root user?
- Subject: Re: Another approach to root user?
- From: Ethan Funk <email@hidden>
- Date: Mon, 27 Mar 2006 18:38:51 -0700
Oops, I meant namespace not userspace.
In any case, the program is not linked (to the best of my knowledge)
to the Cocoa or AppKit framework... this is a GUIless server
application which communicates with any number of clients over a tcp
port. I wrote it mostly in good old C using the pthread library
where needed for locks, threads, semaphores, etc. A totally separate
client program handles GUI. The only library that could be causing
me trouble is the QuickTime library which I use to handle audio file
decompression. But I don't seem to be having any QT problems.
The problem seams to rest someplace with my audio initialization. I
am using HAL and an AU Matrix mixer, neither of which, as I
understand it, care about the namespace. CoreMidi's use of namespace
I am less sure about.
Regardless, I need to find a way to have my audio server run at
startup regardless of what user is logged in (if any), such that
outside machines or any user on the host machine can connect to the
required tcp port with the client application... And I need midi for
"machine control." I could the server run used a user with
autologin, however, I can't figure out how to prevent CoreAudioHAL
from muting when a user switch occurs.
FYI - This application is a multi-client radio automation server.
Thanks,
Ethan...
On Mar 27, 2006, at 3:55 PM, Shaun Wexler wrote:
On Mar 26, 2006, at 3:04 PM, Ethan Funk wrote:
In reference to my previous email about the root user problems:
Maybe I should just run my program in a normal user space. If so
I need a way to keep a GUI logout or a fast users change from that
user from stopping my program or muting the audio. Is this a
possible solution to my problem?
User space means "not in the kernel". Your app^h^h^h daemon is
already running in user space. If it's launched by launchd as
root, then it's likely using the global bootstrap namespace and
can't "see" things in login sessions' bootstrap contexts, which are
typically owned by the window server. Maybe you'd better have a
quick RTFM about the subject:
<http://developer.apple.com/technotes/tn2005/tn2083.html>
You're taking the correct approach, except you can't use AppKit.
--
Shaun Wexler
MacFOH
http://www.macfoh.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden