[PATCH v2 1/2] mktemp: avoid removed mktemp()

Denys Vlasenko vda.linux at googlemail.com
Sun Apr 13 14:41:24 UTC 2014


On Tue, Apr 8, 2014 at 3:11 PM, Bernhard Reutner-Fischer
<rep.dot.nop at gmail.com> wrote:
> +       if (opts & OPT_d) {
>                 if (mkdtemp(chp) == NULL)
>                         goto error;
> +               if (opts & OPT_u)
> +                       rmdir(chp);

This is a change in behavior - now we would
actually create, and then immediately delete the directory
if run as "mktemp -du".

I have mixed feelings about that.
Do you think it's ok?


More information about the busybox mailing list