URL: <https://savannah.gnu.org/bugs/?59083>
Summary: enhancement: find -D exec Project: findutils Submitted by: None Submitted on: Tue 08 Sep 2020 09:07:23 PM UTC Category: find Severity: 3 - Normal Item Group: None Status: None Privacy: Public Assigned to: None Originator Name: Philip Rowlands Originator Email: phr+findut...@dimebar.com Open/Closed: Open Release: None Discussion Lock: Any Fixed Release: None _______________________________________________________ Details: The snippet which brought this to my attention is if find -name '*.txt' -exec grep somestring {} +; then echo somestring found; fi which is fragile because, depending how many greps are launched, some may find a match (and exit 0), some may not (and exit 1), and find reasonably takes a worst-case exit status from the commands exec'd. What made this harder to debug was the lack of useful output from find -D exec; the only output controlled by DebugExec is from show_outstanding_execdirs(). It seems launch() is the right place to add more debug output, perhaps before fflush() / after waitpid(). For example "launching 'grep' with 4000 pathnames" and "process 'grep' exited with status 1" messages in the debug output would make it much clearer. If there's support for this, I can try to craft a patch. _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/bugs/?59083> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/