(0 == code) )
ret = 0;
else
- GNUNET_break (0 == GNUNET_OS_process_kill (p, SIGTERM));
+ GNUNET_break (0 == GNUNET_OS_process_kill (p, GNUNET_TERM_SIG));
GNUNET_OS_process_destroy (p);
}
rt = GNUNET_SCHEDULER_add_read_file (GNUNET_TIME_UNIT_FOREVER_REL,
GNUNET_DISK_pipe_handle (sigpipe,
GNUNET_DISK_PIPE_END_READ),
- &maint_child_death, NULL);
- p = GNUNET_OS_start_process (GNUNET_NO,
+ &maint_child_death, NULL);
+ p = GNUNET_OS_start_process (GNUNET_NO, 0,
NULL, NULL,
program,
program,
- args[0],
+ args[0],
NULL);
GNUNET_free (program);
if (NULL == p)
GNUNET_GETOPT_OPTION_END
};
struct GNUNET_SIGNAL_Context *shc_chld;
+ int ret;
if (GNUNET_OK != GNUNET_STRINGS_get_utf8_args (argc, argv, &argc, &argv))
return 2;
GNUNET_assert (sigpipe != NULL);
shc_chld =
GNUNET_SIGNAL_handler_install (GNUNET_SIGCHLD, &sighandler_child_death);
- if (GNUNET_OK !=
- GNUNET_PROGRAM_run (argc, argv, "gnunet-uri URI",
- gettext_noop ("Perform default-actions for GNUnet URIs"),
- options, &run, NULL))
- return 1;
+ ret = GNUNET_PROGRAM_run (argc, argv, "gnunet-uri URI",
+ gettext_noop ("Perform default-actions for GNUnet URIs"),
+ options, &run, NULL);
GNUNET_SIGNAL_handler_uninstall (shc_chld);
shc_chld = NULL;
GNUNET_DISK_pipe_close (sigpipe);
- sigpipe = NULL;
- return ret;
+ sigpipe = NULL;
+ GNUNET_free ((void *) argv);
+ return (GNUNET_OK == ret) ? 0 : 1;
}
/* end of gnunet-uri.c */