diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-11-03 21:26:40 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-11-03 21:26:40 +0000 |
commit | 721e49caeea6ba5073f8bc5c6c08359295c02bb5 (patch) | |
tree | e06e80ba90af91e9452a48a7a5782913199b4877 /src/datastore/test_datastore_api_management.c | |
parent | 37ac1b7c9e9e05f93d4100cfb53450ec2d370989 (diff) |
original patch from Mantis 1614
Diffstat (limited to 'src/datastore/test_datastore_api_management.c')
-rw-r--r-- | src/datastore/test_datastore_api_management.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/datastore/test_datastore_api_management.c b/src/datastore/test_datastore_api_management.c index 72760de7af..fbb8795a60 100644 --- a/src/datastore/test_datastore_api_management.c +++ b/src/datastore/test_datastore_api_management.c @@ -350,7 +350,7 @@ run (void *cls, static int check () { - pid_t pid; + GNUNET_OS_Process *proc; char cfg_name[128]; char *const argv[] = { "test-datastore-api-management", @@ -368,7 +368,7 @@ check () sizeof (cfg_name), "test_datastore_api_data_%s.conf", plugin_name); - pid = GNUNET_OS_start_process (NULL, NULL, "gnunet-service-arm", + proc = GNUNET_OS_start_process (NULL, NULL, "gnunet-service-arm", "gnunet-service-arm", #if VERBOSE "-L", "DEBUG", @@ -377,12 +377,14 @@ check () GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1, argv, "test-datastore-api", "nohelp", options, &run, NULL); - if (0 != PLIBC_KILL (pid, SIGTERM)) + if (0 != GNUNET_OS_process_kill (proc, SIGTERM)) { GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); ok = 1; } - GNUNET_OS_process_wait(pid); + GNUNET_OS_process_wait (proc); + GNUNET_OS_process_close (proc); + proc = NULL; if (ok != 0) fprintf (stderr, "Missed some testcases: %u\n", ok); return ok; |