diff options
Diffstat (limited to 'libdwfl/argp-std.c')
| -rw-r--r-- | libdwfl/argp-std.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/libdwfl/argp-std.c b/libdwfl/argp-std.c index 8d2bc6aa..42b7e783 100644 --- a/libdwfl/argp-std.c +++ b/libdwfl/argp-std.c @@ -171,10 +171,9 @@ parse_opt (int key, char *arg, struct argp_state *state) if (result != 0) return fail (dwfl, result, arg); - result = INTUSE(dwfl_linux_proc_attach) (dwfl, atoi (arg), false); - if (result != 0) - /* Non-fatal to not be able to attach to process. */ - failure (dwfl, result, _("cannot attach to process")); + /* Non-fatal to not be able to attach to process, ignore error. */ + INTUSE(dwfl_linux_proc_attach) (dwfl, atoi (arg), false); + opt->dwfl = dwfl; } else @@ -301,10 +300,8 @@ parse_opt (int key, char *arg, struct argp_state *state) return fail (dwfl, result, opt->core); } - result = INTUSE(dwfl_core_file_attach) (dwfl, core); - if (result < 0) - /* Non-fatal to not be able to attach to core. */ - failure (dwfl, result, _("cannot attach to core")); + /* Non-fatal to not be able to attach to core, ignore error. */ + INTUSE(dwfl_core_file_attach) (dwfl, core); /* From now we leak FD and CORE. */ |
