gnunet-svn
[Top][All Lists]
Advanced

[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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]