From: Nuno Lopes Date: Mon, 20 Feb 2012 16:01:34 +0000 (+0000) Subject: fix race condition in find (it was finding the copied files over and over again,... X-Git-Tag: php-5.4.0~11 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1800baf4c2e920687a1ab4482e6ec7a96d4a331e;p=php fix race condition in find (it was finding the copied files over and over again, and recursing forever) --- diff --git a/Makefile.gcov b/Makefile.gcov index e499c833bb..946f539d10 100644 --- a/Makefile.gcov +++ b/Makefile.gcov @@ -12,7 +12,8 @@ php_lcov.info: lcov-test @rm -rf lcov_data/ @$(mkinstalldirs) lcov_data/ @echo - -@find . -name \*.gcda -o -name \*.gcno -o -name \*.da -o -name \*.h | sed -e 's/^\.\///' | sed -e 's/\.gcda//g' -e 's/\.gcno//g' -e 's/\.da//g' | uniq | while read x; do \ + -@files=`find . -name \*.gcda -o -name \*.gcno -o -name \*.da -o -name \*.h | sed -e 's/^\.\///' | sed -e 's/\.gcda//g' -e 's/\.gcno//g' -e 's/\.da//g' | uniq` ;\ + for x in $$files; do \ echo -n . ;\ y=`echo $$x | sed -e 's!\.libs/!!'`; \ dir=lcov_data/`dirname $$x`; \