]> git.ipfire.org Git - thirdparty/elfutils.git/commit
debuginfod-find.c: Avoid leaving temp files in the cache
authorAaron Merey <amerey@redhat.com>
Sun, 10 Aug 2025 19:25:39 +0000 (15:25 -0400)
committerAaron Merey <amerey@redhat.com>
Mon, 11 Aug 2025 15:54:43 +0000 (11:54 -0400)
commitd7cb72f70377b033028a6d66dd5e27e40832d0d0
treedf053b0ffb1046d19a3a7c78217667eaa6737d15
parent2e2779857e56151d6bcca4e5cbe088ba0fcfd471
debuginfod-find.c: Avoid leaving temp files in the cache

Add a SIGINT handler to debuginfod-find so that ctrl-c during
a download causes clean up to occur instead of immediately killing
the process and possibly leaving temp files in the client cache.

This change requires setting the client progressfn unconditionally
instead of only when --verbose is given.  This in turn requires a small
change to a debuginfod-find testcase in run-debuginfod-artifact-running.sh
to account for output differences between the debuginfod-find progressfn
and the debuginfod_client default_progressfn which was previously used
when debuginfod-find lacked -v but had DEBUGINFOD_PROGRESS=1 set.

https://sourceware.org/bugzilla/show_bug.cgi?id=33163

Signed-off-by: Aaron Merey <amerey@redhat.com>
debuginfod/debuginfod-find.c
tests/run-debuginfod-artifact-running.sh