Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Re: Re: "unique" filename?

by tune (Curate)
on Dec 04, 2000 at 23:16 UTC ( [id://44891]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Re: Re: "unique" filename?
in thread "unique" filename?

but the existing file can be removed by another thread in less time than 1 second. I understand why I have got downvoted, but the point is not on the method of creating the unique filename it is on how to avoid overwrinting the existing file.

-- tune

Replies are listed 'Best First'.
Re: Re: Re: Re: "unique" filename?
by merlyn (Sage) on Dec 04, 2000 at 23:25 UTC
    If someone else is creating and deleting files with your process ID and your timestamp, you've got more problems than can be solved within the scope of this discussion. For one, you must now do an atomic update, not just test in one operation and set in another.

    Please specify your conditions when you provide a solution. I'm presuming standard Unix, where I can be reasonably assured that time().$$ is unique for a given process. If you've got some weirdo situation, please give it. I'm pretty sure you were downvoted (at least by me :) because you didn't specify your alternative context.

    -- Randal L. Schwartz, Perl hacker

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://44891]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.