[Top][All Lists]

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

Re: uninitialized variables

From: Paul Eggert
Subject: Re: uninitialized variables
Date: Sun, 06 Nov 2005 18:07:10 -0800
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

Ralf Wildenhues <address@hidden> writes:

> +  tmp=
>    trap 'exit_status=$?; rm -fr "$tmp" && exit $exit_status' 0

On ancient systems, "" is an alias for ".", so can you please change
the code to check whether tmp is empty?  Also, we should check that
$tmp is a directory, for the same reason that AS_TMPDIR does.
Something like this, perhaps?

trap '
  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
' 0

This code still has a race condition, as tmpdir might not get cleaned
up if the script is interrupted between the time the directory is made
and $tmp is assigned to.  Perhaps that could be in a comment somewhere.

>         * lib/autoconf/general.m4 (_AC_INIT_DEFAULTS): Initialize
>         ac_clean_files and LIBOBJS.

That looks good to me; please install.

reply via email to

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