diff options
author | Alexander Færøy <ahf@torproject.org> | 2018-11-28 21:55:04 +0100 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-12-17 16:39:28 -0500 |
commit | 5585cbd08f54f732c32feea276c1a47ec8446c5e (patch) | |
tree | 726a83a6ac0446247535e80856ad3f51a78e69b0 /src/test/test_process.c | |
parent | 22cb3c6ce9164920ff81013d5f8dce3c26911af4 (diff) | |
download | tor-5585cbd08f54f732c32feea276c1a47ec8446c5e.tar.gz tor-5585cbd08f54f732c32feea276c1a47ec8446c5e.zip |
Change the Process exit_callback to return bool.
This patch changes our process_t's exit_callback to return a boolean
value. If the returned value is true, the process subsystem will call
process_free() on the given process_t.
See: https://bugs.torproject.org/28179
Diffstat (limited to 'src/test/test_process.c')
-rw-r--r-- | src/test/test_process.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/test/test_process.c b/src/test/test_process.c index 3640b86688..17481097be 100644 --- a/src/test/test_process.c +++ b/src/test/test_process.c @@ -125,7 +125,7 @@ process_stderr_callback(process_t *process, char *data, size_t size) return; } -static void +static bool process_exit_callback(process_t *process, process_exit_code_t exit_code) { tt_ptr_op(process, OP_NE, NULL); @@ -134,7 +134,8 @@ process_exit_callback(process_t *process, process_exit_code_t exit_code) process_data->exit_code = exit_code; done: - return; + /* Do not free up our process_t. */ + return false; } static void |