Using TProcees to run a ps command would see a heap easier than searching /proc yourself. A variant of ps works on just about all unix like systems, /proc is a linux and a few other OS thing only. The Mac for example does not use /proc (from memory, don't have my Mac with me).
The ps command does vary a little, some BSD variants (inc Mac) do need a different command syntax to Linux. OSF was bit different too. But its quite easy to use ifdef to determine the actual option to ps and then same code to run the command and read its result is the same.
Even on systems using /proc, whats there has changed from time to time, while its unlikely anything there now will go away, its far better to allow ps to adjust for lower level behavior.
You do mention you are looking for cases where firefox has crashed. That might mean you need to watch for zombie processes, they will still be listed but not responding. ps will show them as 'z'. Mac seems particularly good at zombie processes. And note that firefox launches a number of processes......
Davo