[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC 05/20] depcomp: safer quoting in variable expansion
From: |
Pavel Raiskup |
Subject: |
Re: [RFC 05/20] depcomp: safer quoting in variable expansion |
Date: |
Fri, 19 Oct 2012 07:39:03 +0200 |
Hi,
On Thu, 2012-10-18 at 22:40 +0200, Stefano Lattarini wrote:
> * lib/depcomp (pgcc): Here. Probably not needed, but since the
> rest of the script seems to employ proper quoting, better to be
> consistent.
>
> Signed-off-by: Stefano Lattarini <address@hidden>
> ---
> lib/depcomp | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/lib/depcomp b/lib/depcomp
> index dbcacd0..2f0c6c5 100755
> --- a/lib/depcomp
> +++ b/lib/depcomp
> @@ -358,24 +358,24 @@ pgcc)
> lockdir=$base.d-lock
> trap "
> echo '$0: caught signal, cleaning up...' >&2
> - rmdir $lockdir
> + rmdir '$lockdir'
here seems to be problem,
thanks,
Pavel
> exit 1
> " 1 2 13 15
> numtries=100
> i=$numtries
> while test $i -gt 0 ; do
> # mkdir is a portable test-and-set.
> - if mkdir $lockdir 2>/dev/null; then
> + if mkdir "$lockdir" 2>/dev/null; then
> # This process acquired the lock.
> "$@" -MD
> stat=$?
> # Release the lock.
> - rmdir $lockdir
> + rmdir "$lockdir"
> break
> else
> ## the lock is being held by a different process,
> ## wait until the winning process is done or we timeout
> - while test -d $lockdir && test $i -gt 0; do
> + while test -d "$lockdir" && test $i -gt 0; do
> sleep 1
> i=`expr $i - 1`
> done
- [RFC 00/20] Refactoring and modernizations in the depcomp script, Stefano Lattarini, 2012/10/18
- [RFC 01/20] depcomp: be more idiomatic in checking for zero exit statuses, Stefano Lattarini, 2012/10/18
- [RFC 02/20] depcomp: remove useless quoting in variable definitions, Stefano Lattarini, 2012/10/18
- [RFC 03/20] depcomp: use "rmdir", not "rm -rf", to remove the empty lock directory, Stefano Lattarini, 2012/10/18
- [RFC 04/20] depcomp: correctly propagate exit status in exit trap, Stefano Lattarini, 2012/10/18
- [RFC 05/20] depcomp: safer quoting in variable expansion, Stefano Lattarini, 2012/10/18
- Re: [RFC 05/20] depcomp: safer quoting in variable expansion,
Pavel Raiskup <=
- [RFC 06/20] depcomp: cosmetic fixlets to a comment, Stefano Lattarini, 2012/10/18
- [RFC 07/20] depcomp: don't rely on character ranges working as in C locale, Stefano Lattarini, 2012/10/18
- [RFC 08/20] depcomp: reduce code duplication, Stefano Lattarini, 2012/10/18
- [RFC 09/20] depcomp: avoid an extra fork when possible, Stefano Lattarini, 2012/10/18
- [RFC 10/20] depcomp: less duplication between AIX and Tru64 modes, Stefano Lattarini, 2012/10/18
- [RFC 11/20] depcomp: make some code more self-documenting, Stefano Lattarini, 2012/10/18
- [RFC 12/20] depcomp: shell code style changes, Stefano Lattarini, 2012/10/18
- [RFC 15/20] depcomp: remove an unused variable, Stefano Lattarini, 2012/10/18
- [RFC 14/20] depcomp: rewrite a sed invocation for less quoting, Stefano Lattarini, 2012/10/18