summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2008-11-20 22:37:43 +0000
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2008-11-20 22:37:43 +0000
commit2e913885f145afd4f2653cf25a5f1016d7362039 (patch)
treef94d0ab7b34540923b7dac30ddca8716312ef3b8
parent148329ca88fb5601790546cd1d70b814893d029a (diff)
downloadopenvpn-2e913885f145afd4f2653cf25a5f1016d7362039.tar.gz
openvpn-2e913885f145afd4f2653cf25a5f1016d7362039.tar.xz
openvpn-2e913885f145afd4f2653cf25a5f1016d7362039.zip
Added new management interface command "pid" to show the
process ID of the current OpenVPN process (Angelo Laub). git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@3552 e7ae566f-a301-0410-adde-c780ea21d3b5
-rw-r--r--manage.c5
-rw-r--r--management/management-notes.txt5
2 files changed, 10 insertions, 0 deletions
diff --git a/manage.c b/manage.c
index a1de027..4248787 100644
--- a/manage.c
+++ b/manage.c
@@ -84,6 +84,7 @@ man_help ()
msg (M_CLIENT, " where action is reply string.");
msg (M_CLIENT, "net : (Windows only) Show network info and routing table.");
msg (M_CLIENT, "password type p : Enter password p for a queried OpenVPN password.");
+ msg (M_CLIENT, "pid : Show process ID of the current OpenVPN process.");
#ifdef ENABLE_PKCS11
msg (M_CLIENT, "pkcs11-id-count : Get number of available PKCS#11 identities.");
msg (M_CLIENT, "pkcs11-id-get index : Get PKCS#11 identity at index.");
@@ -976,6 +977,10 @@ man_dispatch_command (struct management *man, struct status_output *so, const ch
msg (M_CLIENT, "Management Version: %d", MANAGEMENT_VERSION);
msg (M_CLIENT, "END");
}
+ else if (streq (p[0], "pid"))
+ {
+ msg (M_CLIENT, "SUCCESS: pid=%d", openvpn_getpid ());
+ }
else if (streq (p[0], "signal"))
{
if (man_need (man, p, 1, 0))
diff --git a/management/management-notes.txt b/management/management-notes.txt
index 6f50b39..6e721de 100644
--- a/management/management-notes.txt
+++ b/management/management-notes.txt
@@ -247,6 +247,11 @@ COMMAND -- net
of the system network adapter list and routing table based
on information returned by the Windows IP helper API.
+COMMAND -- pid
+--------------
+
+Shows the process ID of the current OpenVPN process.
+
COMMAND -- password and username
--------------------------------