This was on W2K Server which is NTFS. I don't know about FAT32 and how that might or might not work. That's a "dead" file system anyway. Yes, there are some implementation details about this and my memory is a bit foggy. I think that I might have had to rename the .dll and then unlink it. But I was able to get an "in use" .dll name removed from the directory and replaced with a new file without affect upon currently running processes.

Didn't mean to write a tutorial on software update - the main point is that "unlink" does something different than "delete". And that it is definitely possible to "unlink" a file that is currently in use because the "human text name" is not how the file system deals with the file, if the file is "open" and being accessed via the file handle. The actual "deletion" occurs when the file is no longer in use.

Of course in the scheme that I described, there are significant complications in the implementation of how a potentially very long lived process gets notified of this update and how it should go about dealing with it. This whole "update" scenario can become very complicated. However, I am confident that Perl unlink can make things happen that the Windows command line would not allow.


In reply to Re^5: Deleting or unlinking a file by Marshall
in thread Deleting or unlinking a file by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.