summaryrefslogtreecommitdiff
path: root/src/test/test_process.c
diff options
context:
space:
mode:
authorAlexander Færøy <ahf@torproject.org>2018-11-22 05:22:24 +0100
committerNick Mathewson <nickm@torproject.org>2018-12-17 16:39:28 -0500
commit89393a77e5db804784d4f08ef67fd2831799d65b (patch)
treebc6560f11c60d944b6b220ce0349469bf0c6ca4a /src/test/test_process.c
parentbb784cf4f36256a8276ba60641d3ff766b9cd9df (diff)
downloadtor-89393a77e5db804784d4f08ef67fd2831799d65b.tar.gz
tor-89393a77e5db804784d4f08ef67fd2831799d65b.zip
Add process_get_pid() to the Process subsystem.
This patch adds support for getting the unique process identifier from a given process_t. This patch implements both support for both the Unix and Microsoft Windows backend. See: https://bugs.torproject.org/28179
Diffstat (limited to 'src/test/test_process.c')
-rw-r--r--src/test/test_process.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/test/test_process.c b/src/test/test_process.c
index 85ee9691a4..4f86e786cb 100644
--- a/src/test/test_process.c
+++ b/src/test/test_process.c
@@ -160,6 +160,9 @@ test_default_values(void *arg)
tt_assert(smartlist_contains(process_get_all_processes(),
process));
+ /* Default PID is 0. */
+ tt_int_op(0, OP_EQ, process_get_pid(process));
+
/* Our arguments should be empty. */
tt_int_op(0, OP_EQ,
smartlist_len(process_get_arguments(process)));