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.c | |
parent | 37ac1b7c9e9e05f93d4100cfb53450ec2d370989 (diff) |
original patch from Mantis 1614
Diffstat (limited to 'src/datastore/test_datastore_api.c')
-rw-r--r-- | src/datastore/test_datastore_api.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/datastore/test_datastore_api.c b/src/datastore/test_datastore_api.c index ae7782d6cf..feba0b7ac9 100644 --- a/src/datastore/test_datastore_api.c +++ b/src/datastore/test_datastore_api.c @@ -641,7 +641,7 @@ check () { char cfg_name[128]; #if START_DATASTORE - pid_t pid; + GNUNET_OS_Process *proc; #endif char *const argv[] = { "test-datastore-api", @@ -660,7 +660,7 @@ check () "test_datastore_api_data_%s.conf", plugin_name); #if START_DATASTORE - 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", @@ -671,12 +671,14 @@ check () argv, "test-datastore-api", "nohelp", options, &run, NULL); #if START_DATASTORE - 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; #endif if (ok != 0) fprintf (stderr, "Missed some testcases: %u\n", ok); |