Crypt/GPG/ProcessControl.php
public function terminate()
    {
        if (function_exists('posix_kill')) {
            posix_kill($this->pid, 15);
        } elseif (PHP_OS === 'WINNT') {
            exec('taskkill /PID ' . escapeshellarg($this->pid));
        } else {
            exec('kill -15 ' . escapeshellarg($this->pid));
        }
    }
public function terminate()
    {
        if (function_exists('posix_kill')) {
            posix_kill($this->pid, 15);
        } elseif (PHP_OS === 'WINNT') {
            exec('taskkill /PID ' . escapeshellarg($this->pid));
        } else {
            exec('kill -15 ' . escapeshellarg($this->pid));
        }
    }
Ends the process gracefully

The signal SIGTERM is sent to the process. The gpg-agent process will
end gracefully upon receiving the SIGTERM signal. Upon 3 consecutive
SIGTERM signals the gpg-agent will forcefully shut down.

If the <kbd>posix</kbd> extension is available, <kbd>posix_kill()</kbd>
is used. Otherwise <kbd>kill</kbd> is used on UNIX-like systems and
<kbd>taskkill</kbd> is used in Windows.

@return void