I'm currently trying to create a small program that allows you to adjust the audio volume for each app that's currently running (just like the windows audio mixer). Identifying the process is done via the process id, but the problem is that some apps, like Google Chrome, use multiple processes (one for each tab) with the same name. I don't really know how to identify the main process, "Google Chrome" in this case. Currently I'm just getting the process id of each Chrome tab, instead of the program itself.
So, Is there a way to identify the main/parent process of a program?