[Top][All Lists]

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


From: Paul Eggert
Date: Mon, 06 Dec 2004 14:13:24 -0800
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

Stepan Kasal <address@hidden> writes:

> We would have to enhance the cleanup command this way:
> rm -f -r conftest* confdefs* conf$[$]* $ac_clean_files \
>       `eval $ac_clean_files_eval`

Why do we have to do that?  Is it merely to avoid a race condition?

But a race condition is inevitable when you use mktemp.  There will
always be a window between the time that the directory is created, and
the time that the calling shell script knows the name of the
directory.  If a signal arrives during that window, the directory will
not be cleaned up.

Since there's a race condition no matter what, we might as well use
your simpler solution, which is to say

        ac_clean_files="$ac_clean_files $tmp"

after $tmp is created, as soon as possible (to make the window narrow).

A better solution would be to fix the race condition.  This could be
done by blocking signals while the directory is being created.  This
will require some fancy footwork, though.  Perhaps for now we could
just do the simple solution.

reply via email to

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