/* soft-kill only possible with pipes */
GNUNET_assert (NULL != h->helper_in);
ret = GNUNET_DISK_pipe_close (h->helper_in);
/* soft-kill only possible with pipes */
GNUNET_assert (NULL != h->helper_in);
ret = GNUNET_DISK_pipe_close (h->helper_in);
if (GNUNET_SYSERR ==
GNUNET_SERVER_mst_receive (h->mst, NULL, buf, t, GNUNET_NO, GNUNET_NO))
{
if (GNUNET_SYSERR ==
GNUNET_SERVER_mst_receive (h->mst, NULL, buf, t, GNUNET_NO, GNUNET_NO))
{
stop_helper (h, GNUNET_NO);
h->restart_task =
GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS,
stop_helper (h, GNUNET_NO);
h->restart_task =
GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS,
stop_helper (h, GNUNET_NO);
h->restart_task =
GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS,
stop_helper (h, GNUNET_NO);
h->restart_task =
GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS,
return;
}
GNUNET_DISK_pipe_close_end (h->helper_out, GNUNET_DISK_PIPE_END_WRITE);
GNUNET_DISK_pipe_close_end (h->helper_in, GNUNET_DISK_PIPE_END_READ);
if (NULL != h->mst)
h->read_task = GNUNET_SCHEDULER_add_read_file (GNUNET_TIME_UNIT_FOREVER_REL,
return;
}
GNUNET_DISK_pipe_close_end (h->helper_out, GNUNET_DISK_PIPE_END_WRITE);
GNUNET_DISK_pipe_close_end (h->helper_in, GNUNET_DISK_PIPE_END_READ);
if (NULL != h->mst)
h->read_task = GNUNET_SCHEDULER_add_read_file (GNUNET_TIME_UNIT_FOREVER_REL,
h->write_task = GNUNET_SCHEDULER_add_write_file (GNUNET_TIME_UNIT_FOREVER_REL,
h->fh_to_helper, &helper_write, h);
return;
h->write_task = GNUNET_SCHEDULER_add_write_file (GNUNET_TIME_UNIT_FOREVER_REL,
h->fh_to_helper, &helper_write, h);
return;
if (NULL == (sh = h->sh_head))
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
if (NULL == (sh = h->sh_head))
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
}
buf = (const char*) sh->msg;
t = GNUNET_DISK_file_write (h->fh_to_helper,
}
buf = (const char*) sh->msg;
t = GNUNET_DISK_file_write (h->fh_to_helper,
* @param cont continuation to run once the message is out (#GNUNET_OK on succees, #GNUNET_NO
* if the helper process died, #GNUNET_SYSERR during #GNUNET_HELPER_destroy).
* @param cont_cls closure for @a cont
* @param cont continuation to run once the message is out (#GNUNET_OK on succees, #GNUNET_NO
* if the helper process died, #GNUNET_SYSERR during #GNUNET_HELPER_destroy).
* @param cont_cls closure for @a cont
const struct GNUNET_MessageHeader *msg,
int can_drop,
GNUNET_HELPER_Continuation cont,
const struct GNUNET_MessageHeader *msg,
int can_drop,
GNUNET_HELPER_Continuation cont,
sh);
if (GNUNET_SCHEDULER_NO_TASK == h->write_task)
h->write_task = GNUNET_SCHEDULER_add_write_file (GNUNET_TIME_UNIT_FOREVER_REL,
sh);
if (GNUNET_SCHEDULER_NO_TASK == h->write_task)
h->write_task = GNUNET_SCHEDULER_add_write_file (GNUNET_TIME_UNIT_FOREVER_REL,