Having to deal with a process that fails or doesn't fail depending on
whether there are coredumps or not is incredibly annoying for users.
<refsect1>
<title>Exit status</title>
- <para>On success, 0 is returned; otherwise, a non-zero failure
- code is returned. Not finding any matching core dumps is treated as
- failure.
- </para>
+ <para>On success, 0 is returned; otherwise, a non-zero failure code is returned.</para>
</refsect1>
<refsect1>
}
if (!arg_field && n_found <= 0) {
- if (!arg_quiet)
+ if (!arg_quiet && !sd_json_format_enabled(arg_json_format_flags))
log_notice("No coredumps found.");
- return -ESRCH;
+
+ return 0;
}
}