![]() |
GNUnet
0.11.x
|
tool to dispatch URIs to the appropriate GNUnet helper process More...
Go to the source code of this file.
Functions | |
static void | maint_child_death (void *cls) |
Task triggered whenever we receive a SIGCHLD (child process died) or when user presses CTRL-C. More... | |
static void | run (void *cls, char *const *args, const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *cfg) |
Main function that will be run by the scheduler. More... | |
static void | sighandler_child_death () |
Signal handler called for SIGCHLD. More... | |
int | main (int argc, char *const *argv) |
The main function to handle gnunet://-URIs. More... | |
Variables | |
static long unsigned int | exit_code = 0 |
Handler exit code. More... | |
static struct GNUNET_OS_Process * | p |
Helper process we started. More... | |
static struct GNUNET_DISK_PipeHandle * | sigpipe |
Pipe used to communicate shutdown via signal. More... | |
tool to dispatch URIs to the appropriate GNUnet helper process
Definition in file gnunet-uri.c.
|
static |
Task triggered whenever we receive a SIGCHLD (child process died) or when user presses CTRL-C.
cls | closure, NULL |
Definition at line 52 of file gnunet-uri.c.
References exit_code, GNUNET_break, GNUNET_OK, GNUNET_OS_process_destroy(), GNUNET_OS_PROCESS_EXITED, GNUNET_OS_process_kill(), GNUNET_OS_process_status(), GNUNET_TERM_SIG, and type.
Referenced by run().
|
static |
Main function that will be run by the scheduler.
cls | closure |
args | remaining command-line arguments |
cfgfile | name of the configuration file used (for saving, can be NULL!) |
cfg | configuration |
Definition at line 73 of file gnunet-uri.c.
References _, GNUNET_CONFIGURATION_get_value_string(), GNUNET_DISK_PIPE_END_READ, GNUNET_DISK_pipe_handle(), GNUNET_free, GNUNET_OK, GNUNET_OS_INHERIT_STD_NONE, GNUNET_OS_start_process(), GNUNET_SCHEDULER_add_read_file(), GNUNET_SCHEDULER_cancel(), GNUNET_strndup, GNUNET_TIME_UNIT_FOREVER_REL, maint_child_death(), subsystem, and uri.
Referenced by main().
|
static |
Signal handler called for SIGCHLD.
Triggers the respective handler by writing to the trigger pipe.
Definition at line 137 of file gnunet-uri.c.
References GNUNET_break, GNUNET_DISK_file_write(), GNUNET_DISK_PIPE_END_WRITE, and GNUNET_DISK_pipe_handle().
Referenced by main().
int main | ( | int | argc, |
char *const * | argv | ||
) |
The main function to handle gnunet://-URIs.
argc | number of arguments from the command line |
argv | command line arguments |
Definition at line 160 of file gnunet-uri.c.
References exit_code, gettext_noop, GNUNET_assert, GNUNET_DISK_PF_NONE, GNUNET_DISK_pipe(), GNUNET_DISK_pipe_close(), GNUNET_free_nz, GNUNET_GETOPT_OPTION_END, GNUNET_OK, GNUNET_PROGRAM_run(), GNUNET_SIGCHLD, GNUNET_SIGNAL_handler_install(), GNUNET_SIGNAL_handler_uninstall(), GNUNET_STRINGS_get_utf8_args(), ret, run(), shc_chld, and sighandler_child_death().
|
static |
Handler exit code.
Definition at line 32 of file gnunet-uri.c.
Referenced by main(), and maint_child_death().
|
static |
Helper process we started.
Definition at line 37 of file gnunet-uri.c.
|
static |
Pipe used to communicate shutdown via signal.
Definition at line 42 of file gnunet-uri.c.