From 89393a77e5db804784d4f08ef67fd2831799d65b Mon Sep 17 00:00:00 2001 From: Alexander Færøy Date: Thu, 22 Nov 2018 05:22:24 +0100 Subject: 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 --- src/test/test_process.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/test/test_process.c') 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))); -- cgit v1.2.3-54-g00ecf