in reply to Checking for unlinked process executables

/proc/PID/exe is a symlink to a filename, not to a file. So you can't tell just by looking at it whether the executable stored at (eg) /usr/sbin/apache is really the one that is running. Better, I think, to do something like this pseudo-code:
foreach PID lsof -p PID | grep FILENAME and parse out the inode number stat FILENAME do the inodes match?
still not foolproof, of course. It's also far more portable to use utilities like lsof than to grovel around in /proc which doesn't even exist on some systems. But on Linux/x86 (and presumably Linux/others too) all the information you need is in /proc/PID/maps.