I'm writing a piece of software that runs as a system service in Mac OSX and cannot seem to find out how to get the 'active' user.
There appears to be APIs to iterate through the list of logged-in users and be able to tell from a value which one has the machine console... however I cannot find any documentation on these APIs.
Looking at /dev
, it appears that the /dev/console
device is owned by the currently logged-in user... however I have been unable to find any documentation to confirm this.
Any ideas?