diff options
author | Werner Koch <[email protected]> | 2007-10-02 16:30:58 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2007-10-02 16:30:58 +0000 |
commit | ed7d2d72c64ea23d65d014511a4f0cf74dc144d6 (patch) | |
tree | 70a32592c35e19ed28029bf85a627791b21b0c46 /scd/command.c | |
parent | Use Assuan socket wrapper calls. (diff) | |
download | gnupg-ed7d2d72c64ea23d65d014511a4f0cf74dc144d6.tar.gz gnupg-ed7d2d72c64ea23d65d014511a4f0cf74dc144d6.zip |
Extended gpg-connect-agent.
New "GETINFO pid" command for scdaemon and gpg-agent.
Diffstat (limited to 'scd/command.c')
-rw-r--r-- | scd/command.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/scd/command.c b/scd/command.c index e65262d06..361b13f51 100644 --- a/scd/command.c +++ b/scd/command.c @@ -1452,6 +1452,7 @@ cmd_unlock (assuan_context_t ctx, char *line) Supported values of WHAT are: version - Return the version of the program. + pid - Return the process id of the server. socket_name - Return the name of the socket. @@ -1476,6 +1477,13 @@ cmd_getinfo (assuan_context_t ctx, char *line) const char *s = VERSION; rc = assuan_send_data (ctx, s, strlen (s)); } + else if (!strcmp (line, "pid")) + { + char numbuf[50]; + + snprintf (numbuf, sizeof numbuf, "%lu", (unsigned long)getpid ()); + rc = assuan_send_data (ctx, numbuf, strlen (numbuf)); + } else if (!strcmp (line, "socket_name")) { const char *s = scd_get_socket_name (); |