[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20120326205804.GE10259@sepie.suse.cz>
Date: Mon, 26 Mar 2012 22:58:04 +0200
From: Michal Marek <mmarek@...e.cz>
To: Roland Dreier <roland@...nel.org>
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH] setlocalversion: Use "grep -q" instead of piping output
to "read dummy"
On Fri, Mar 23, 2012 at 09:42:27AM -0700, Roland Dreier wrote:
> From: Roland Dreier <roland@...estorage.com>
>
> In some circumstances (eg when running a build in an emacs shell
> buffer), I get a spew of messages like
>
> grep: writing output: Broken pipe
>
> from setlocalversion, because the "read" subshell apparently exits as
> soon as it reads one line and gives EPIPE to grep. It's not clear to
> me why this way of writing the check was used instead of just using
> grep -q to suppress output, but unless there is some deep reason I
> don't know, this way looks cleaner to me anyway, and gets rid of the
> ugly message spew.
I guess the author was used to write it this way, because ancient grep
versions did not have -q.
> (I double checked at http://pubs.opengroup.org/onlinepubs/009604499/utilities/grep.html
> and "grep -q" is specified in POSIX / SuS, so hopefully even people
> cross-compiling the kernel on some bizarre host OS can't complain
> about this change)
Yeah, I think it's safe. Thanks for double-checking.
Applied to kbuild.git#kbuild now.
Michal
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists