I have a pet project where I am trying to develop a small antivirus program for Linux. I have already designed the mathematical model and the heuristic approach that I plan on using, yet now I am struggling when trying to fingerprint the host machine.
In order to achieve that, I need to list all the processes and their state and output them to a text file. I did try to accomplish that via scanning the proc folder recursively yet I was wondering if there is a better way to do this. I am aware of the fact that processes with a short lifespan will slip by when doing it this way so I am trying to find the most elegant and simple solution for this in C++.