I am developing a background service which needs to run on Windows, Linux, Mac OS and Solaris. The service is very simple and is to be used to track students logging in and out of university computers. I have almost finished the Windows implementation of the service.
I have invested in a number of books around native application / service development for Linux and for Mac OS. I can learn the fundamentals from those but there is something more specific which I need which seems to be much too specific a topic to be covered by the books I have.
The question is about native events on Linux and Mac OS which a background service can register to respond to when a user logs in and out. I would also need to get the user id of the user who logged in or out (which should be more straightforward once the first item is solved).
Being new to native development for Linux and Mac OS I could really benefit from some help from more experience developers for these platforms. A friend suggested that PAM can be used to register to be notified of such events. Is this true?
I may not need to know the exact details of everything I have to do but it would be good to know what native events / mechanisms are available to achieve this (if any but I am hoping there are because Windows certainly has them).
Kind Regards
Carl