Do kill(0, $pid) instead of check /proc/$pid for portability