I am parsing process details out of
/proc/PID
The owner of the process is the owner of all files in the /proc/PID
directory.
$ ls -l /proc/27595
total 0
dr-xr-xr-x 2 me users 0 Jul 14 11:53 attr
-r-------- 1 me users 0 Jul 14 11:53 auxv
...
Also the file /proc/PID/loginuid
holds the UID of the owner of the process.
$ cat /proc/27595/loginuid
1000