in reply to Re: Safe Temp Files
in thread Safe Temp Files

Using a PID is easy and commonly used on UNIX, but it might bite you if you port that to Windows if you want the file to survive after the program. On UNIX the PIDs cycle around, and it will be "a long time" before your PID gets reused, but on Windows a PID can get reused by the next process that starts.

Replies are listed 'Best First'.
Re^3: Safe Temp Files
by blue_cowdawg (Monsignor) on Dec 04, 2006 at 18:17 UTC
        Windows a PID can get reused by the next process that starts.

    Yes, I am aware of that limitation on 'doze. Fortunately for me I don't do a lot of coding on that platform and for the occasion I stick with File::Temp and write the filename to a log file for perusal/retrieval later on.


    Peter L. Berghold -- Unix Professional
    Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg