This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: tar and open files


At 10:10 PM 2/20/2004, Steven Hartland you wrote:
>----- Original Message ----- 
>From: "Larry Hall" 
>> At 07:25 PM 2/20/2004, Steven Hartland you wrote:
>> >That's a cool idea but its not an install so no pending files :(
>> >
>> >I was toying with the idea of amending tar for cygwin so that
>> >it could move the offending files to a specific dir or /var/tmp
>> >by default when encountering such a file. All the times I've
>> >tried this its still possible to move the file even though its
>> >locked open. Delete fails otherwise --unlink would work
>> >Actually now I just said it could alter --unlink to do a move
>> >if the delete failed and that would also fix and would be
>> >a neater solution. What do people think?
>> 
>> 
>> If it's just delaying the problem, I'm not sure this really helps.
>> What happens when you tar again?  What happens to the "thing" that's
>> locked the file?  How do you get it to "update" to the new one.  If
>> this doesn't just push the puck down the ice, I think it's a great 
>> idea. 
>
>In the situation I have here its updating an app where we are
>not bothered if it doesnt get updated till the user restarts the
>app. The thing that's locked the file will continue to run with
>the old version without issue, only when it unlocks and
>subsequently reopens ( e.g. in a restart ) will it pick the new
>file up. The only issue I see is the remaining files after move
>one hack for this may be to manually move them to the
>recycle bin if that's possible? Duplicate names in the
>destination could be easily be checked for so that's not
>an issue. If recycle bin isn't an option then the system temp
>dir with a suitable filename might be a way to go unless
>there's is a FS level delete on close within win32?
>


Delete-on-close in Win32 is O/S based, not file-system based AFAIK.
And it's pretty buggy on older platforms.  I think what you're suggesting
could work fine for your case (and others like it) but I'm not sure I 
see a good general solution, unless someone's willing to write a file
system filter driver or something (yuck! ;-) ).


--
Larry Hall                              http://www.rfk.com
RFK Partners, Inc.                      (508) 893-9779 - RFK Office
838 Washington Street                   (508) 893-9889 - FAX
Holliston, MA 01746                     


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]