I am trying to get these functions to work. When I issue `KillEsniper` I tend to get empty results, and nothing happens. I have stared at this code for days now and it does not work and I cant seem to see whats wrong with it. A pair of second eyes would probably do miracles.

```
    function KillEsniper($pid) {
        if (isEsniperRunning($pid) == true) {
            exec("kill -15 ".$pid);
            putEsniperLog("-KILLESNIPER- Killing esniper process with pid {$pid}");
        }
    }

    function getPids() {
        $output = shell_exec("pidof -x esniper");
        if ($output != "\n") {
            $pids = split(" ",rtrim($output));
        }
        return($pids);
    }

    function isEsniperRunning($pid) {
        $pids = getPids();
        if (!empty($pids)) {
            if (strpos($pid,$pids)) {
                return(true);
            }
        } else {
            return(false);
        }
    }

```