X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Finclude%2Fgnunet_helper_lib.h;h=191d97b80e71b9d5bfd25df50ec3021ac63dd5dd;hb=6973ade884b8e22e7fcaa51a90d00a8caa2d2fa4;hp=12a4d3fe18dd14cd2cf16ae84cd87a6647f79a86;hpb=89daff335a418fb67ce8ea4d3e1e128e96d19877;p=oweals%2Fgnunet.git diff --git a/src/include/gnunet_helper_lib.h b/src/include/gnunet_helper_lib.h index 12a4d3fe1..191d97b80 100644 --- a/src/include/gnunet_helper_lib.h +++ b/src/include/gnunet_helper_lib.h @@ -51,6 +51,7 @@ typedef void (*GNUNET_HELPER_ExceptionCallback) (void *cls); * restarted when it dies except when it is stopped using GNUNET_HELPER_stop() * or when the exp_cb callback is not NULL. * + * @param with_control_pipe does the helper support the use of a control pipe for signalling? * @param binary_name name of the binary to run * @param binary_argv NULL-terminated list of arguments to give when starting the binary (this * argument must not be modified by the client for @@ -62,7 +63,8 @@ typedef void (*GNUNET_HELPER_ExceptionCallback) (void *cls); * @return the new Handle, NULL on error */ struct GNUNET_HELPER_Handle * -GNUNET_HELPER_start (const char *binary_name, +GNUNET_HELPER_start (int with_control_pipe, + const char *binary_name, char *const binary_argv[], GNUNET_SERVER_MessageTokenizerCallback cb, GNUNET_HELPER_ExceptionCallback exp_cb, @@ -78,6 +80,16 @@ void GNUNET_HELPER_stop (struct GNUNET_HELPER_Handle *h); +/** + * Kills the helper by closing its stdin (the helper is expected to catch the + * resulting SIGPIPE and shutdown), closes the pipe and frees the handle + * + * @param h handle to helper to stop + */ +void +GNUNET_HELPER_soft_stop (struct GNUNET_HELPER_Handle *h); + + /** * Continuation function. *