I'm currently writing a FUSE application that should implement process based access rights. I now stumble about the fact, that FUSE only provides the ThreadID, not the ProcessID. Now I need to find the PID (or Thread Group ID) for the given Thread ID of a different process.
I noticed that the proc fs provides Thread based information (even a ls /proc does not show none PID TID's they can still be accessed through /proc/<TID>/) in this way I can ask /proc/<TID>/status about the Tgid, but as my FUSE app will serve hundreds of requests per second, I feel this might not be the best way here.
Does anyone know a syscall or function of the form gettgid(tid) to be used here?