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) | |
download | gnunet-721e49caeea6ba5073f8bc5c6c08359295c02bb5.tar.gz gnunet-721e49caeea6ba5073f8bc5c6c08359295c02bb5.zip |
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 72760de7a..fbb8795a6 100644 --- a/src/datastore/test_datastore_api_management.c +++ b/src/datastore/test_datastore_api_management.c | |||
@@ -350,7 +350,7 @@ run (void *cls, | |||
350 | static int | 350 | static int |
351 | check () | 351 | check () |
352 | { | 352 | { |
353 | pid_t pid; | 353 | GNUNET_OS_Process *proc; |
354 | char cfg_name[128]; | 354 | char cfg_name[128]; |
355 | char *const argv[] = { | 355 | char *const argv[] = { |
356 | "test-datastore-api-management", | 356 | "test-datastore-api-management", |
@@ -368,7 +368,7 @@ check () | |||
368 | sizeof (cfg_name), | 368 | sizeof (cfg_name), |
369 | "test_datastore_api_data_%s.conf", | 369 | "test_datastore_api_data_%s.conf", |
370 | plugin_name); | 370 | plugin_name); |
371 | pid = GNUNET_OS_start_process (NULL, NULL, "gnunet-service-arm", | 371 | proc = GNUNET_OS_start_process (NULL, NULL, "gnunet-service-arm", |
372 | "gnunet-service-arm", | 372 | "gnunet-service-arm", |
373 | #if VERBOSE | 373 | #if VERBOSE |
374 | "-L", "DEBUG", | 374 | "-L", "DEBUG", |
@@ -377,12 +377,14 @@ check () | |||
377 | GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1, | 377 | GNUNET_PROGRAM_run ((sizeof (argv) / sizeof (char *)) - 1, |
378 | argv, "test-datastore-api", "nohelp", | 378 | argv, "test-datastore-api", "nohelp", |
379 | options, &run, NULL); | 379 | options, &run, NULL); |
380 | if (0 != PLIBC_KILL (pid, SIGTERM)) | 380 | if (0 != GNUNET_OS_process_kill (proc, SIGTERM)) |
381 | { | 381 | { |
382 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); | 382 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); |
383 | ok = 1; | 383 | ok = 1; |
384 | } | 384 | } |
385 | GNUNET_OS_process_wait(pid); | 385 | GNUNET_OS_process_wait (proc); |
386 | GNUNET_OS_process_close (proc); | ||
387 | proc = NULL; | ||
386 | if (ok != 0) | 388 | if (ok != 0) |
387 | fprintf (stderr, "Missed some testcases: %u\n", ok); | 389 | fprintf (stderr, "Missed some testcases: %u\n", ok); |
388 | return ok; | 390 | return ok; |