On 13/09/14 11:42, Michał Górny wrote:
> Place all temporary files within a single, quasi-atomically created
> temporary directory rather than relying on unsafe 'mktemp -u'. This
> prevents possible race conditions in case two parallel 'mktemp -u' calls
> returned the same path. Additionally, it reduces TMPDIR pollution by
> keeping all test files in a single subdirectory.
> ---
Looks safer, comments inline
> configure | 26 +++++++++++---------------
> 1 file changed, 11 insertions(+), 15 deletions(-)
>
> diff --git a/configure b/configure
> index 81e1d3f..753893d 100755
> --- a/configure
> +++ b/configure
> @@ -2584,24 +2584,22 @@ HOSTEXESUF=$(exesuf $host_os)
> : ${TMPDIR:=$TMP}
> : ${TMPDIR:=/tmp}
>
> -if ! check_cmd mktemp -u XXXXXX; then
> - # simple replacement for missing mktemp
> - # NOT SAFE FOR GENERAL USE
> - mktemp(){
> - echo "${2%%XXX*}.${HOSTNAME}.${UID}.$$"
> - }
> -fi
> +SUBTMPDIR=
> +
> +trap '[ -n "${SUBTMPDIR}" ] && rm -r -f "${SUBTMPDIR}"' EXIT
Is there a specific reason not to move the cleanup trap below, where the
former one for mktemp is?
Looks fine to me and I'd candidate it for stable as well.
lu
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel