diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2012-06-14 08:51:48 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2012-06-14 08:51:48 +0000 |
commit | e5813ba1a2630818148fad6c050c4fedf4edcd34 (patch) | |
tree | 3d83ccf3c94e10edf32c79eeb6982c7b2e0682ff /src/util/test_common_logging_runtime_loglevels.c | |
parent | 67c53faae90324e1acbd98a91c1231eddc318d9d (diff) | |
download | gnunet-e5813ba1a2630818148fad6c050c4fedf4edcd34.tar.gz gnunet-e5813ba1a2630818148fad6c050c4fedf4edcd34.zip |
fix for segfault
Diffstat (limited to 'src/util/test_common_logging_runtime_loglevels.c')
-rw-r--r-- | src/util/test_common_logging_runtime_loglevels.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/util/test_common_logging_runtime_loglevels.c b/src/util/test_common_logging_runtime_loglevels.c index 5ad9d9860..df152ba6a 100644 --- a/src/util/test_common_logging_runtime_loglevels.c +++ b/src/util/test_common_logging_runtime_loglevels.c | |||
@@ -50,13 +50,16 @@ end_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
50 | { | 50 | { |
51 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Ending phase %d, ok is %d\n", phase, | 51 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Ending phase %d, ok is %d\n", phase, |
52 | ok); | 52 | ok); |
53 | if (0 != GNUNET_OS_process_kill (proc, SIGTERM)) | 53 | if (NULL != proc) |
54 | { | 54 | { |
55 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); | 55 | if (0 != GNUNET_OS_process_kill (proc, SIGTERM)) |
56 | { | ||
57 | GNUNET_log_strerror (GNUNET_ERROR_TYPE_WARNING, "kill"); | ||
58 | } | ||
59 | GNUNET_OS_process_wait (proc); | ||
60 | GNUNET_OS_process_destroy (proc); | ||
61 | proc = NULL; | ||
56 | } | 62 | } |
57 | GNUNET_OS_process_wait (proc); | ||
58 | GNUNET_OS_process_destroy (proc); | ||
59 | proc = NULL; | ||
60 | GNUNET_DISK_pipe_close (pipe_stdout); | 63 | GNUNET_DISK_pipe_close (pipe_stdout); |
61 | if (ok == 1) | 64 | if (ok == 1) |
62 | { | 65 | { |