According to Pádraig Brady on 2/22/2010 6:40 AM:
> On 21/02/10 13:43, jema...@gnu.org wrote:
>>
>> Hi.
>>
>> Just another little patch to avoid some of the sc_* rules to freeze if
>> the filtering of VC_LIST_EXCEPT gives an empty string (for example,
>> 'make sc_error_exit_success' freezes if there are not source files in
>> ${srcdir}/).
>>
>> I found this problem due to the bazaar issue in vc-list-files.

I've run into it before as well, thanks for working on it.

>>
>>
>> 2010-02-21  Jose E. Marchesi<jema...@gnu.org>
>>
>>     * top/maint.mk (sc_error_exit_success): Apply the rule only if the
>>     filtering of VC_LIST_EXCEPT is not empty.  Otherwise the main grep
>>     freezes waiting for data in the standard input.
> Would it be better to just add /dev/null as a parameter to grep?
> I.E. like:
> 
>     @grep -nE 'error \(EXIT_SUCCESS,'                \
>         $$($(VC_LIST_EXCEPT) /dev/null | grep -E '\.[chly]$$')&&    \
>       { echo '$(ME): found error (EXIT_SUCCESS' 1>&2; exit 1; } || :

Yes, that is indeed the canonical approach to guarantee that grep never
tries to operate on stdin.  Please rework the patch accordingly.

-- 
Don't work too hard, make some time for fun as well!

Eric Blake             e...@byu.net

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to