in reply to how to get which user is on

See also getpwuid, getlogin, and fork
--------------
"But what of all those sweet words you spoke in private?"
"Oh that's just what we call pillow talk, baby, that's all."