vadiraj wrote: > I'm trying to fetch userid using utmp.h API's. I'm able to get the > userid from the funciton getutline(3) on normal process. But the > same function while called by a daemon process it fails with perror > "no such process". > > Any Idea why this is failing on a daemon process? Because the daemon hasn't logged itself to the utmp file. The utmp file is intended for recording "logged-in users". daemon processes don't normally register themselves. -- Glynn Clements <glynn@xxxxxxxxxxxxxxxxxx> - To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html