[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [patch] Avoid some of the sc_ rules to freeze

From: Eric Blake
Subject: Re: [patch] Avoid some of the sc_ rules to freeze
Date: Mon, 22 Feb 2010 06:56:25 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20090812 Thunderbird/ Mnenhy/

According to Pádraig Brady on 2/22/2010 6:40 AM:
> On 21/02/10 13:43, address@hidden 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<address@hidden>
>>     * 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             address@hidden

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]