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

Re: [FWP] Puzzle - Temp file creation



Chaim Frenkel writes:
|Anyway on to the method, Given that this is a temporary name, and since
|it is using $$, why is it searching?

1 - Another copy of the script may have started long enough ago that pids
have wrapped (which may not be very long on fast, busy machines).

2 - Vicki just presented a code fragment, we don't know that it's not
called multiple times by the same script.

3 - Just because the script using the fragment is nice about its temp
files is no guarantee that all other scripts are. It may be unlikely that
an unrelated script would choose a name that conflicts, but it's possible
and I'd rather have a script choose a different temp file than blow up.

Brian

==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe