[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [taler-merchant] 03/08: convenience function to kill+wait+d
From: |
gnunet |
Subject: |
[GNUnet-SVN] [taler-merchant] 03/08: convenience function to kill+wait+destroy processes. |
Date: |
Fri, 02 Mar 2018 15:02:16 +0100 |
This is an automated email from the git hooks/post-receive script.
marcello pushed a commit to branch master
in repository merchant.
commit 5422937e5655f46586be99a019c4308a7c69f66f
Author: Marcello Stanisci <address@hidden>
AuthorDate: Wed Feb 28 15:48:43 2018 +0100
convenience function to kill+wait+destroy processes.
---
src/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
index e9685f3..428bb9c 100644
--- 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)
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [taler-merchant] branch master updated (19bc21b -> 75a7824), gnunet, 2018/03/02
- [GNUnet-SVN] [taler-merchant] 02/08: fix compiler warning., gnunet, 2018/03/02
- [GNUnet-SVN] [taler-merchant] 03/08: convenience function to kill+wait+destroy processes.,
gnunet <=
- [GNUnet-SVN] [taler-merchant] 01/08: twisted skeleton., gnunet, 2018/03/02
- [GNUnet-SVN] [taler-merchant] 07/08: config file for twisted tests., gnunet, 2018/03/02
- [GNUnet-SVN] [taler-merchant] 06/08: do not compile twister-based checks, gnunet, 2018/03/02
- [GNUnet-SVN] [taler-merchant] 04/08: finish testing if twister started correctly., gnunet, 2018/03/02
- [GNUnet-SVN] [taler-merchant] 05/08: fix compilation regarding twister-lib dep., gnunet, 2018/03/02
- [GNUnet-SVN] [taler-merchant] 08/08: gitignore, gnunet, 2018/03/02