merchant

Merchant backend to process payments, run by merchants
Log | Files | Refs | Submodules | README | LICENSE

commit 5422937e5655f46586be99a019c4308a7c69f66f
parent ae2951782dd9097e413271bff60c3e2ea6ef1327
Author: Marcello Stanisci <stanisci.m@gmail.com>
Date:   Wed, 28 Feb 2018 15:48:43 +0100

convenience function to kill+wait+destroy processes.

Diffstat:
Msrc/lib/test_merchant_api_twisted.c | 17++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/src/lib/test_merchant_api_twisted.c b/src/lib/test_merchant_api_twisted.c @@ -635,6 +635,19 @@ run (void *cls, fakebank_url); } +/** + * Kill, wait, and destroy convenience function. + * + * @param process process to purge. + */ +static void +purge_process (struct GNUNET_OS_Process *process) +{ + GNUNET_OS_process_kill (process, SIGKILL); + GNUNET_OS_process_wait (process); + GNUNET_OS_process_destroy (process); +} + int main (int argc, char * const *argv) @@ -675,9 +688,7 @@ main (int argc, ret = TALER_TESTING_setup_with_exchange (&run, NULL, CONFIG_FILE); - GNUNET_OS_process_kill (merchantd, SIGKILL); - GNUNET_OS_process_wait (merchantd); - GNUNET_OS_process_destroy (merchantd); + purge_process (merchantd); GNUNET_free (merchant_url); if (GNUNET_OK != ret)