On Sun, Sep 21, 2014 at 06:31:04PM +0200, Michał Górny wrote: > Dnia 2014-09-21, o godz. 11:52:25 > Diego Biurrun <[email protected]> napisał(a): > > This reduces TMPDIR pollution and possibly avoids race conditions with > > temporary files that are not atomically created. > > > > Based on a patch from Michał Górny <[email protected]>. > > --- > > --- a/configure > > +++ b/configure > > @@ -2593,15 +2593,18 @@ if ! check_cmd mktemp -u XXXXXX; then > > > > +AVTMPDIR=$(mktemp -u "${TMPDIR}/avconf.XXXXXXXX" 2> /dev/null) > > + > > +mkdir $AVTMPDIR || die "Unable to create temporary directory in $TMPDIR." > > Your patch no longer avoids race conditions since once again you are > using 'mktemp -u'. In fact, I don't understand at all why you are > creating the directory manually when 'mktemp -d' will do that for you.
There are systems without mktemp(). > Additionally, you removed the fallback for when 'mktemp' is not > available. You don't have any checks for that case, so configure will > simply attempt to run with empty $AVTMPDIR which -- depending on > implementation of mkdir -- will either fail because mkdir is called > with no arguments or continue trying to create files in root directory. No, I'm keeping the mktemp() replacement that you removed. Have you tested what happens w/o mktemp() in your implementation? You only create the subdir if "mktemp -d" works, so creating the actual temporary files should fail. > Finally, you didn't quote $AVTMPDIR. Thanks, good catch. Diego _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
