Fixed process detection logic for GNU/Linux and FreeBSD operating systems.