I'm trying to implement a solution in pure C to monitor new entries made to log file that records a high volume of requests to a web service.
I would like something like tail -f, where a change in the log file results in my process getting the new changes instantly.
This needs to run on Solaris 10, unfortunately.
I know this question has been asked and answered in other threads, but none of the solutions acceptable for my situation
1) The solution must not require super user access in any way. As this is a enterprise production environment, no superuser access is available to me on this system, so I can't do something like install a driver.
2) The log file will be very large. Parsing it entirely, repeatedly for new changes is not acceptable.
It seems to me that if I can run tail -f as a non-privileged user, I should be able to do the same programmatically as the same user. I realize a nice hack would be to pipe the output from tail -f into my process, though I would like something cleaner.