commit b91f4280a7e17ea164ca33c0f3a5e16b13ff4af9 parent 49f58007a33e14cb746bfc9a5b8fd098eac1ff26 Author: Christian Grothoff <grothoff@gnunet.org> Date: Wed, 2 Aug 2023 12:13:10 +0200 attempt to fix signal/cleanup race Diffstat:
| M | src/testing/testing_api_cmd_system_start.c | | | 24 | ++++++++++++------------ |
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/src/testing/testing_api_cmd_system_start.c b/src/testing/testing_api_cmd_system_start.c @@ -282,18 +282,6 @@ system_cleanup (void *cls, GNUNET_SCHEDULER_cancel (as->reader); as->reader = NULL; } - if (NULL != as->pipe_in) - { - GNUNET_break (GNUNET_OK == - GNUNET_DISK_pipe_close (as->pipe_in)); - as->pipe_in = NULL; - } - if (NULL != as->pipe_out) - { - GNUNET_break (GNUNET_OK == - GNUNET_DISK_pipe_close (as->pipe_out)); - as->pipe_out = NULL; - } if (NULL != as->system_proc) { if (as->active) @@ -306,6 +294,18 @@ system_cleanup (void *cls, GNUNET_OS_process_destroy (as->system_proc); as->system_proc = NULL; } + if (NULL != as->pipe_in) + { + GNUNET_break (GNUNET_OK == + GNUNET_DISK_pipe_close (as->pipe_in)); + as->pipe_in = NULL; + } + if (NULL != as->pipe_out) + { + GNUNET_break (GNUNET_OK == + GNUNET_DISK_pipe_close (as->pipe_out)); + as->pipe_out = NULL; + } for (unsigned int i = 0; NULL != as->args[i]; i++) GNUNET_free (as->args[i]);