GNUnet  0.11.x
Macros | Functions | Variables
gnunet-qr.c File Reference
#include <stdio.h>
#include <zbar.h>
#include <stdbool.h>
#include "platform.h"
#include "gnunet_util_lib.h"
Include dependency graph for gnunet-qr.c:

Go to the source code of this file.

Macros

#define LOG(fmt, ...)
 

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 sighandler_chld ()
 Signal handler called for signals that causes us to wait for the child process. More...
 
static void gnunet_uri (void *cls, const char *uri, const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *cfg)
 Dispatch URIs to the appropriate GNUnet helper process. More...
 
static const zbar_symbol_t * get_symbol (zbar_processor_t *proc)
 Obtain QR code 'symbol' from proc. More...
 
static char * run_zbar ()
 Run zbar QR code parser. 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...
 
int main (int argc, char *const *argv)
 

Variables

static char * device = "/dev/video0"
 Video device to capture from. More...
 
static unsigned int verbose
 –verbose option More...
 
static int silent = false
 –silent option More...
 
static long unsigned int exit_code = 1
 Handler exit code. More...
 
static struct GNUNET_OS_Processp
 Helper process we started. More...
 
static struct GNUNET_SIGNAL_Contextshc_chld
 Child signal handler. More...
 
static struct GNUNET_DISK_PipeHandlesigpipe
 Pipe used to communicate child death via signal. More...
 
static pid_t my_pid
 Process ID of this process at the time we installed the various signal handlers. More...
 

Detailed Description

Author
Hartmut Goebel (original implementation)
Martin Schanzenbach (integrate gnunet-uri)
Christian Grothoff (error handling)

Definition in file gnunet-qr.c.

Macro Definition Documentation

◆ LOG

#define LOG (   fmt,
  ... 
)
Value:
if (verbose) \
printf (fmt, ## __VA_ARGS__)
static unsigned int verbose
–verbose option
Definition: gnunet-qr.c:44

Definition at line 32 of file gnunet-qr.c.

Referenced by get_symbol(), and run_zbar().

Function Documentation

◆ maint_child_death()

static void maint_child_death ( void *  cls)
static

Task triggered whenever we receive a SIGCHLD (child process died) or when user presses CTRL-C.

Parameters
clsclosure, NULL

Definition at line 84 of file gnunet-qr.c.

References exit_code, GNUNET_break, GNUNET_DISK_pipe_close(), GNUNET_OK, GNUNET_OS_process_destroy(), GNUNET_OS_PROCESS_EXITED, GNUNET_OS_process_kill(), GNUNET_OS_process_status(), GNUNET_SIGNAL_handler_uninstall(), GNUNET_TERM_SIG, and type.

Referenced by gnunet_uri().

85 {
87 
88  if ((GNUNET_OK != GNUNET_OS_process_status (p, &type, &exit_code)) ||
89  (type != GNUNET_OS_PROCESS_EXITED))
92  shc_chld = NULL;
93  if (NULL != sigpipe)
94  {
96  sigpipe = NULL;
97  }
99 }
static struct GNUNET_DISK_PipeHandle * sigpipe
Pipe used to communicate child death via signal.
Definition: gnunet-qr.c:69
void GNUNET_OS_process_destroy(struct GNUNET_OS_Process *proc)
Cleans up process structure contents (OS-dependent) and deallocates it.
Definition: os_priority.c:287
int GNUNET_OS_process_status(struct GNUNET_OS_Process *proc, enum GNUNET_OS_ProcessStatusType *type, unsigned long *code)
Retrieve the status of a process.
Definition: os_priority.c:963
void GNUNET_SIGNAL_handler_uninstall(struct GNUNET_SIGNAL_Context *ctx)
Uninstall a previously installed signal hander.
Definition: signal.c:77
#define GNUNET_break(cond)
Use this for internal assertion violations that are not fatal (can be handled) but should not occur...
static struct GNUNET_OS_Process * p
Helper process we started.
Definition: gnunet-qr.c:59
GNUNET_OS_ProcessStatusType
Process status types.
The process exited with a return code.
int GNUNET_DISK_pipe_close(struct GNUNET_DISK_PipeHandle *p)
Closes an interprocess channel.
Definition: disk.c:1650
static struct GNUNET_SIGNAL_Context * shc_chld
Child signal handler.
Definition: gnunet-qr.c:64
enum GNUNET_TESTBED_UnderlayLinkModelType type
the type of this model
#define GNUNET_TERM_SIG
The termination signal.
Definition: platform.h:246
int GNUNET_OS_process_kill(struct GNUNET_OS_Process *proc, int sig)
Sends a signal to the process.
Definition: os_priority.c:225
static long unsigned int exit_code
Handler exit code.
Definition: gnunet-qr.c:54
Here is the call graph for this function:
Here is the caller graph for this function:

◆ sighandler_chld()

static void sighandler_chld ( )
static

Signal handler called for signals that causes us to wait for the child process.

Definition at line 106 of file gnunet-qr.c.

References GNUNET_DISK_file_write(), GNUNET_DISK_PIPE_END_WRITE, GNUNET_DISK_pipe_handle(), and my_pid.

Referenced by gnunet_uri().

107 {
108  static char c;
109  int old_errno = errno; /* backup errno */
110 
111  if (getpid () != my_pid)
112  _exit (1); /* we have fork'ed since the signal handler was created,
113  * ignore the signal, see https://gnunet.org/vfork discussion */
116  &c, sizeof(c));
117  errno = old_errno;
118 }
static struct GNUNET_DISK_PipeHandle * sigpipe
Pipe used to communicate child death via signal.
Definition: gnunet-qr.c:69
const struct GNUNET_DISK_FileHandle * GNUNET_DISK_pipe_handle(const struct GNUNET_DISK_PipeHandle *p, enum GNUNET_DISK_PipeEnd n)
Get the handle to a particular pipe end.
Definition: disk.c:1688
ssize_t GNUNET_DISK_file_write(const struct GNUNET_DISK_FileHandle *h, const void *buffer, size_t n)
Write a buffer to a file.
Definition: disk.c:820
The writing-end of a pipe.
static pid_t my_pid
Process ID of this process at the time we installed the various signal handlers.
Definition: gnunet-qr.c:75
Here is the call graph for this function:
Here is the caller graph for this function:

◆ gnunet_uri()

static void gnunet_uri ( void *  cls,
const char *  uri,
const char *  cfgfile,
const struct GNUNET_CONFIGURATION_Handle cfg 
)
static

Dispatch URIs to the appropriate GNUnet helper process.

Parameters
clsclosure
uriuri to dispatch
cfgfilename of the configuration file used (for saving, can be NULL!)
cfgconfiguration

Definition at line 130 of file gnunet-qr.c.

References _, GNUNET_array_append, GNUNET_array_grow, GNUNET_assert, GNUNET_CONFIGURATION_get_value_string(), GNUNET_DISK_pipe(), GNUNET_DISK_PIPE_END_READ, GNUNET_DISK_pipe_handle(), GNUNET_free, GNUNET_NO, GNUNET_OK, GNUNET_OS_INHERIT_STD_ALL, GNUNET_OS_start_process_vap(), GNUNET_SCHEDULER_add_read_file(), GNUNET_SCHEDULER_cancel(), GNUNET_SIGNAL_handler_install(), GNUNET_strdup, GNUNET_strndup, GNUNET_TIME_UNIT_FOREVER_REL, maint_child_death(), my_pid, sighandler_chld(), subsystem, and uri.

Referenced by run().

134 {
135  const char *orig_uri;
136  const char *slash;
137  char *subsystem;
138  char *program;
139  struct GNUNET_SCHEDULER_Task *rt;
140 
141  orig_uri = uri;
142  if (0 != strncasecmp ("gnunet://", uri, strlen ("gnunet://")))
143  {
144  fprintf (stderr,
145  _ ("Invalid URI: does not start with `%s'\n"),
146  "gnunet://");
147  return;
148  }
149  uri += strlen ("gnunet://");
150  if (NULL == (slash = strchr (uri, '/')))
151  {
152  fprintf (stderr, _ ("Invalid URI: fails to specify subsystem\n"));
153  return;
154  }
155  subsystem = GNUNET_strndup (uri, slash - uri);
156  if (GNUNET_OK !=
157  GNUNET_CONFIGURATION_get_value_string (cfg, "uri", subsystem, &program))
158  {
159  fprintf (stderr, _ ("No handler known for subsystem `%s'\n"), subsystem);
160  GNUNET_free (subsystem);
161  return;
162  }
163  GNUNET_free (subsystem);
165  GNUNET_NO,
166  GNUNET_NO,
167  GNUNET_NO);
168  GNUNET_assert (NULL != sigpipe);
173  NULL);
174  my_pid = getpid ();
176  &sighandler_chld);
177 
178  {
179  char **argv = NULL;
180  unsigned int argc = 0;
181  char *u = GNUNET_strdup (program);
182 
183  for (const char *tok = strtok (u, " ");
184  NULL != tok;
185  tok = strtok (NULL, " "))
186  GNUNET_array_append (argv,
187  argc,
188  GNUNET_strdup (tok));
189  GNUNET_array_append (argv,
190  argc,
191  GNUNET_strdup (orig_uri));
192  GNUNET_array_append (argv,
193  argc,
194  NULL);
197  NULL,
198  NULL,
199  NULL,
200  argv[0],
201  argv);
202  for (unsigned int i = 0; i<argc - 1; i++)
203  GNUNET_free (argv[i]);
204  GNUNET_array_grow (argv,
205  argc,
206  0);
207  GNUNET_free (u);
208  }
209  if (NULL == p)
211  GNUNET_free (program);
212 }
static char * subsystem
Set to subsystem that we&#39;re going to get stats for (or NULL for all).
static void sighandler_chld()
Signal handler called for signals that causes us to wait for the child process.
Definition: gnunet-qr.c:106
#define GNUNET_array_append(arr, len, element)
Append an element to an array (growing the array by one).
static struct GNUNET_DISK_PipeHandle * sigpipe
Pipe used to communicate child death via signal.
Definition: gnunet-qr.c:69
#define GNUNET_assert(cond)
Use this for fatal errors that cannot be handled.
struct GNUNET_SCHEDULER_Task * GNUNET_SCHEDULER_add_read_file(struct GNUNET_TIME_Relative delay, const struct GNUNET_DISK_FileHandle *rfd, GNUNET_SCHEDULER_TaskCallback task, void *task_cls)
Schedule a new task to be run with a specified delay or when the specified file descriptor is ready f...
Definition: scheduler.c:1667
#define GNUNET_strdup(a)
Wrapper around GNUNET_xstrdup_.
const struct GNUNET_DISK_FileHandle * GNUNET_DISK_pipe_handle(const struct GNUNET_DISK_PipeHandle *p, enum GNUNET_DISK_PipeEnd n)
Get the handle to a particular pipe end.
Definition: disk.c:1688
#define _(String)
GNU gettext support macro.
Definition: platform.h:184
static struct GNUNET_FS_Uri * uri
Value of URI provided on command-line (when not publishing a file but just creating UBlocks to refer ...
Use this option to have all of the standard streams (stdin, stdout and stderror) be inherited...
#define GNUNET_array_grow(arr, size, tsize)
Grow a well-typed (!) array.
static struct GNUNET_OS_Process * p
Helper process we started.
Definition: gnunet-qr.c:59
struct GNUNET_OS_Process * GNUNET_OS_start_process_vap(int pipe_control, enum GNUNET_OS_InheritStdioFlags std_inheritance, struct GNUNET_DISK_PipeHandle *pipe_stdin, struct GNUNET_DISK_PipeHandle *pipe_stdout, struct GNUNET_DISK_PipeHandle *pipe_stderr, const char *filename, char *const argv[])
Start a process.
Definition: os_priority.c:607
#define GNUNET_TIME_UNIT_FOREVER_REL
Constant used to specify "forever".
The reading-end of a pipe.
struct GNUNET_DISK_PipeHandle * GNUNET_DISK_pipe(int blocking_read, int blocking_write, int inherit_read, int inherit_write)
Creates an interprocess channel.
Definition: disk.c:1461
int GNUNET_CONFIGURATION_get_value_string(const struct GNUNET_CONFIGURATION_Handle *cfg, const char *section, const char *option, char **value)
Get a configuration value that should be a string.
struct GNUNET_SIGNAL_Context * GNUNET_SIGNAL_handler_install(int signal, GNUNET_SIGNAL_Handler handler)
Install a signal handler that will be run if the given signal is received.
Definition: signal.c:51
#define GNUNET_strndup(a, length)
Wrapper around GNUNET_xstrndup_.
Entry in list of pending tasks.
Definition: scheduler.c:134
static struct GNUNET_SIGNAL_Context * shc_chld
Child signal handler.
Definition: gnunet-qr.c:64
static pid_t my_pid
Process ID of this process at the time we installed the various signal handlers.
Definition: gnunet-qr.c:75
#define GNUNET_free(ptr)
Wrapper around free.
static void maint_child_death(void *cls)
Task triggered whenever we receive a SIGCHLD (child process died) or when user presses CTRL-C...
Definition: gnunet-qr.c:84
void * GNUNET_SCHEDULER_cancel(struct GNUNET_SCHEDULER_Task *task)
Cancel the task with the specified identifier.
Definition: scheduler.c:972
Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_symbol()

static const zbar_symbol_t* get_symbol ( zbar_processor_t *  proc)
static

Obtain QR code 'symbol' from proc.

Parameters
proczbar processor to use
Returns
NULL on error

Definition at line 222 of file gnunet-qr.c.

References device, GNUNET_break, GNUNET_ERROR_TYPE_ERROR, GNUNET_log, and LOG.

Referenced by run_zbar().

223 {
224  const zbar_symbol_set_t *symbols;
225  int rc;
226  int n;
227 
228  if (0 != zbar_processor_parse_config (proc, "enable"))
229  {
230  GNUNET_break (0);
231  return NULL;
232  }
233 
234  /* initialize the Processor */
235  if (0 != (rc = zbar_processor_init (proc, device, 1)))
236  {
238  "Failed to open device `%s': %d\n",
239  device,
240  rc);
241  return NULL;
242  }
243 
244  /* enable the preview window */
245  if ((0 != (rc = zbar_processor_set_visible (proc, 1))) ||
246  (0 != (rc = zbar_processor_set_active (proc, 1))))
247  {
248  GNUNET_break (0);
249  return NULL;
250  }
251 
252  /* read at least one barcode (or until window closed) */
253  LOG ("Capturing\n");
254  n = zbar_process_one (proc, -1);
255 
256  /* hide the preview window */
257  (void) zbar_processor_set_active (proc, 0);
258  (void) zbar_processor_set_visible (proc, 0);
259  if (-1 == n)
260  return NULL; /* likely user closed the window */
261  LOG ("Got %i images\n", n);
262  /* extract results */
263  symbols = zbar_processor_get_results (proc);
264  if (NULL == symbols)
265  {
266  GNUNET_break (0);
267  return NULL;
268  }
269  return zbar_symbol_set_first_symbol (symbols);
270 }
static char * device
Video device to capture from.
Definition: gnunet-qr.c:39
#define GNUNET_break(cond)
Use this for internal assertion violations that are not fatal (can be handled) but should not occur...
#define LOG(fmt,...)
Definition: gnunet-qr.c:32
#define GNUNET_log(kind,...)
Here is the caller graph for this function:

◆ run_zbar()

static char* run_zbar ( )
static

Run zbar QR code parser.

Returns
NULL on error, otherwise the URI that we found

Definition at line 279 of file gnunet-qr.c.

References data, get_symbol(), GNUNET_break, GNUNET_strdup, LOG, and ret.

Referenced by run().

280 {
281  zbar_processor_t *proc;
282  const char *data;
283  char *ret;
284  const zbar_symbol_t *symbol;
285 
286  /* configure the Processor */
287  proc = zbar_processor_create (1);
288  if (NULL == proc)
289  {
290  GNUNET_break (0);
291  return NULL;
292  }
293 
294  symbol = get_symbol (proc);
295  if (NULL == symbol)
296  {
297  zbar_processor_destroy (proc);
298  return NULL;
299  }
300  data = zbar_symbol_get_data (symbol);
301  if (NULL == data)
302  {
303  GNUNET_break (0);
304  zbar_processor_destroy (proc);
305  return NULL;
306  }
307  LOG ("Found %s \"%s\"\n",
308  zbar_get_symbol_name (zbar_symbol_get_type (symbol)),
309  data);
310  ret = GNUNET_strdup (data);
311  /* clean up */
312  zbar_processor_destroy (proc);
313  return ret;
314 }
static const zbar_symbol_t * get_symbol(zbar_processor_t *proc)
Obtain QR code &#39;symbol&#39; from proc.
Definition: gnunet-qr.c:222
static int ret
Return value of the commandline.
Definition: gnunet-abd.c:81
#define GNUNET_strdup(a)
Wrapper around GNUNET_xstrdup_.
#define GNUNET_break(cond)
Use this for internal assertion violations that are not fatal (can be handled) but should not occur...
#define LOG(fmt,...)
Definition: gnunet-qr.c:32
uint32_t data
The data value.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ run()

static void run ( void *  cls,
char *const *  args,
const char *  cfgfile,
const struct GNUNET_CONFIGURATION_Handle cfg 
)
static

Main function that will be run by the scheduler.

Parameters
clsclosure
argsremaining command-line arguments
cfgfilename of the configuration file used (for saving, can be NULL!)
cfgconfiguration

Definition at line 326 of file gnunet-qr.c.

References data, exit_code, GNUNET_free, gnunet_uri(), and run_zbar().

Referenced by main().

330 {
331  char *data;
332 
333  data = run_zbar ();
334  if (NULL == data)
335  return;
336  gnunet_uri (cls, data, cfgfile, cfg);
337  if (exit_code != 0)
338  {
339  printf ("Failed to add URI %s\n", data);
340  }
341  else
342  {
343  printf ("Added URI %s\n", data);
344  }
345  GNUNET_free (data);
346 };
static void gnunet_uri(void *cls, const char *uri, const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *cfg)
Dispatch URIs to the appropriate GNUnet helper process.
Definition: gnunet-qr.c:130
static char * run_zbar()
Run zbar QR code parser.
Definition: gnunet-qr.c:279
uint32_t data
The data value.
#define GNUNET_free(ptr)
Wrapper around free.
static long unsigned int exit_code
Handler exit code.
Definition: gnunet-qr.c:54
Here is the call graph for this function:
Here is the caller graph for this function:

◆ main()

int main ( int  argc,
char *const *  argv 
)

Definition at line 350 of file gnunet-qr.c.

References device, exit_code, gettext_noop, GNUNET_GETOPT_OPTION_END, GNUNET_GETOPT_option_flag(), GNUNET_GETOPT_option_string(), GNUNET_GETOPT_option_verbose(), GNUNET_OK, GNUNET_PROGRAM_run(), ret, run(), silent, and verbose.

351 {
352  int ret;
355  'd',
356  "device",
357  "DEVICE",
358  gettext_noop ("use video-device DEVICE (default: /dev/video0"),
359  &device),
362  "silent",
363  gettext_noop ("do not show preview windows"),
364  &silent),
366  };
367 
368  ret = GNUNET_PROGRAM_run (
369  argc,
370  argv,
371  "gnunet-qr",
372  gettext_noop (
373  "Scan a QR code using a video device and import the uri read"),
374  options,
375  &run,
376  NULL);
377  return ((GNUNET_OK == ret) && (0 == exit_code)) ? 0 : 1;
378 }
struct GNUNET_GETOPT_CommandLineOption options[]
Definition: 002.c:5
static char * device
Video device to capture from.
Definition: gnunet-qr.c:39
struct GNUNET_GETOPT_CommandLineOption GNUNET_GETOPT_option_verbose(unsigned int *level)
Define the &#39;-V&#39; verbosity option.
static int ret
Return value of the commandline.
Definition: gnunet-abd.c:81
Definition of a command line option.
struct GNUNET_GETOPT_CommandLineOption GNUNET_GETOPT_OPTION_END
Definition: 002.c:13
struct GNUNET_GETOPT_CommandLineOption GNUNET_GETOPT_option_string(char shortName, const char *name, const char *argumentHelp, const char *description, char **str)
Allow user to specify a string.
static int silent
–silent option
Definition: gnunet-qr.c:49
static unsigned int verbose
–verbose option
Definition: gnunet-qr.c:44
struct GNUNET_GETOPT_CommandLineOption GNUNET_GETOPT_option_flag(char shortName, const char *name, const char *description, int *val)
Allow user to specify a flag (which internally means setting an integer to 1/GNUNET_YES/GNUNET_OK.
int GNUNET_PROGRAM_run(int argc, char *const *argv, const char *binaryName, const char *binaryHelp, const struct GNUNET_GETOPT_CommandLineOption *options, GNUNET_PROGRAM_Main task, void *task_cls)
Run a standard GNUnet command startup sequence (initialize loggers and configuration, parse options).
Definition: program.c:367
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.
Definition: gnunet-qr.c:326
#define gettext_noop(String)
Definition: gettext.h:69
static long unsigned int exit_code
Handler exit code.
Definition: gnunet-qr.c:54
Here is the call graph for this function:

Variable Documentation

◆ device

char* device = "/dev/video0"
static

Video device to capture from.

Sane default for GNU/Linux systems.

Definition at line 39 of file gnunet-qr.c.

Referenced by get_symbol(), and main().

◆ verbose

unsigned int verbose
static

–verbose option

Definition at line 44 of file gnunet-qr.c.

Referenced by main().

◆ silent

int silent = false
static

–silent option

Definition at line 49 of file gnunet-qr.c.

Referenced by main().

◆ exit_code

long unsigned int exit_code = 1
static

Handler exit code.

Definition at line 54 of file gnunet-qr.c.

Referenced by main(), maint_child_death(), and run().

◆ p

struct GNUNET_OS_Process* p
static

Helper process we started.

Definition at line 59 of file gnunet-qr.c.

Referenced by _make_continuous_arg_copy(), access_handler_callback(), adjust(), age_values(), ats_performance_info_cb(), block_proc(), block_reader(), check_priority(), comm_connect_cb(), comm_disconnect_cb(), comm_schedule_send(), compute_scalar_product(), compute_service_response(), context_state_callback(), create_loc_uri(), CustomPeerMap_put(), CustomPeerMap_remove_peer(), display_bar(), display_request(), dns_result_parser(), do_connect_peers(), do_shutdown(), do_stop_task(), download_stop_task(), dump_buffer(), encode_cont(), enforce_add_address(), enforce_del_address(), enforce_start_property(), enforce_start_request(), enforce_stop_preference(), enforce_stop_request(), enforce_stop_send(), evaluate(), find_timed_out(), format_help(), free_link_properties(), free_preference(), get_all_peers_iterator(), get_all_tunnels_iterator(), get_hello(), get_keywords_from_tokens(), get_longest_prefix(), get_path_from_GNUNET_PREFIX(), get_path_from_PATH(), get_pipeline(), get_preferences_cb(), getPRK(), GN_getopt_internal(), gns_resolve_name(), GNUNET_ATS_solver_generate_preferences_start(), GNUNET_ATS_TEST_logging_now(), GNUNET_CADET_open_port(), GNUNET_CONFIGURATION_create(), GNUNET_CONTAINER_meta_data_insert(), GNUNET_CONTAINER_multihashmap32_remove(), GNUNET_CONTAINER_multihashmap32_remove_all(), GNUNET_CONTAINER_multihashmap_remove(), GNUNET_CONTAINER_multihashmap_remove_all(), GNUNET_CONTAINER_multipeermap_remove(), GNUNET_CONTAINER_multipeermap_remove_all(), GNUNET_CONTAINER_multishortmap_remove(), GNUNET_CONTAINER_multishortmap_remove_all(), GNUNET_CONTAINER_multiuuidmap_remove(), GNUNET_CONTAINER_multiuuidmap_remove_all(), GNUNET_CRYPTO_ecc_ecdh(), GNUNET_CRYPTO_ecdh_ecdsa(), GNUNET_CRYPTO_ecdh_eddsa(), GNUNET_CRYPTO_ecdsa_ecdh(), GNUNET_CRYPTO_eddsa_ecdh(), GNUNET_CRYPTO_mpi_print_unsigned(), GNUNET_CRYPTO_paillier_create(), GNUNET_CRYPTO_zero_keys(), GNUNET_DISK_pipe_from_fd(), GNUNET_DNSPARSER_parse(), GNUNET_FS_publish_main_(), GNUNET_FS_publish_make_status_(), GNUNET_MY_exec_prepared(), GNUNET_OS_check_helper_binary(), GNUNET_OS_init(), GNUNET_SCHEDULER_cancel(), GNUNET_SECRETSHARING_share_read(), GNUNET_SECRETSHARING_share_write(), GNUNET_SERVER_add_handlers(), GNUNET_TRANSPORT_TESTING_connect_check(), GNUNET_TRANSPORT_TESTING_done(), GNUNET_TRANSPORT_TESTING_start_peer(), GSF_cadet_query_cancel(), handle_dns_request(), handle_index_start_failed(), handle_index_start_ok(), handle_ping(), handle_pong(), handle_show_path(), handle_signature_response(), hash_for_index_cb(), ibf_hashcode_from_key(), index_mq_error_handler(), libgnunet_plugin_transport_udp_init(), main(), modify_request(), notify_connect(), notify_disconnect(), oprelease_overlay_configure_topology(), opstart_overlay_configure_topology(), parse_definitions(), parse_pattern(), peer_info_cb(), peerinformation_cb(), process_result(), progress_cb(), progress_proc(), publish_content(), publish_kblocks(), publish_kblocks_cont(), publish_stop_task(), queue_ready_task(), recursive_dns_resolution(), regex_add(), regex_combine(), REGEX_INTERNAL_construct_nfa(), run(), run_process_and_wait(), search_stop_task(), set_feedback_task(), set_pref_task(), set_prop_task(), shutdown_task(), solver_bandwidth_changed_cb(), start_cb(), start_download(), start_publish(), stop_broadcast(), update_ping_data(), and update_pong_data().

◆ shc_chld

struct GNUNET_SIGNAL_Context* shc_chld
static

Child signal handler.

Definition at line 64 of file gnunet-qr.c.

Referenced by main().

◆ sigpipe

struct GNUNET_DISK_PipeHandle* sigpipe
static

Pipe used to communicate child death via signal.

Definition at line 69 of file gnunet-qr.c.

◆ my_pid

pid_t my_pid
static

Process ID of this process at the time we installed the various signal handlers.

Definition at line 75 of file gnunet-qr.c.

Referenced by gnunet_uri(), and sighandler_chld().