public static function term($pid, $lagger_timeout = 0, $signal = SIGTERM) {

        $kill_time = time() + $lagger_timeout;

        // $term = posix_kill($pid, $signal);
        $term = self::signal($pid, $signal);

        while ( time() < $kill_time ) {

            if ( !self::isRunning($pid) ) return $term;
            usleep(20000);

        }

        return self::kill($pid);

    }