- main_config = afb_config_parse_arguments(argc, argv);
- if (json_object_object_get_ex(main_config, "name", &name)) {
- verbose_set_name(json_object_get_string(name), 0);
- process_name_set_name(json_object_get_string(name));
- process_name_replace_cmdline(argv, json_object_get_string(name));
+ main_config = afb_args_parse(argc, argv);
+ if (sig_monitor_init(
+ !json_object_object_get_ex(main_config, "trap-faults", &obj)
+ || json_object_get_boolean(obj)) < 0) {
+ ERROR("failed to initialise signal handlers");
+ return 1;
+ }
+
+
+ if (json_object_object_get_ex(main_config, "name", &obj)) {
+ verbose_set_name(json_object_get_string(obj), 0);
+ process_name_set_name(json_object_get_string(obj));
+ process_name_replace_cmdline(argv, json_object_get_string(obj));