Re: [PATCH 1/1] devel/release-checks.sh: added check that 1st NEWS header is tidy

Subject: Re: [PATCH 1/1] devel/release-checks.sh: added check that 1st NEWS header is tidy

Date: Mon, 18 Feb 2013 18:25:27 +0200

To: David Bremner, notmuch@notmuchmail.org

Cc:

From: Tomi Ollila


On Sat, Feb 16 2013, David Bremner <david@tethera.net> wrote:

> Tomi Ollila <tomi.ollila@iki.fi> writes:
>
>> +echo -n "Checking that NEWS header is tidy... "
>> +if [ "`exec sed 's/./=/g; 1q' NEWS`" = "`exec sed '1d; 2q' NEWS`" ]
>
> This patch seems OK to me, although the execs might be a bit overkill
> for a script that is run once ever few months.

You're right. The 2 extra fork(2):s(*) here doesn't matter...

In case you don't amend my patch in following weeks I'll send
a new patch :)

> d

(*) FYI: It is only bash(1) which forks process to execute the external
command in such a trivial cases. Most (if not all) other shells have
(conservative) heuristics to avoid the "extra" fork there. If you're
interested, my simple way to test this is 'strace -ff -o pidc cmd args...'

Tomi

Thread: