That kind of session (which is what you get when you run your daemon as root) is immune to the HAL's tracking of the currently active user login stuff.
OK, the only problem is, the server won't run as any user but root in as non-console session. Below I have listed the chunk of code where I think it fails with the following console message: Mar 28 14:36:21 Dusk ./arserver: kCGErrorRangeCheck : Window Server communications from outside of session allowed for root and console user only
The code never gets to the sprintf and write lines, which send a message telling me where it's at for debuging. It does send beduging message just prior to this section. Any thoughts?
Ethan...
desc.componentType = kAudioUnitType_Mixer; desc.componentSubType = kAudioUnitSubType_MatrixMixer; desc.componentManufacturer = kAudioUnitManufacturer_Apple; desc.componentFlags = 0; desc.componentFlagsMask = 0; if(comp = FindNextComponent(0, &desc)){ result = OpenAComponent(comp, &mixer); if (result) return -1; }else{ return -1; } sprintf(command, "found MatrixMixer\n", i); write(statsock[0], command, strlen(command));
|