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

Re: [MiNT] [MiNT]operations on open files,was: FreeMiNT 1.18 release



WongCK, 07.12.2012 02:39:17:

As long as process has an open handle to a file, it can access its
data, regardless of where, whether or under what name the file resides
in.



Yes, correct on both paragraph.

Renaming and deletion are operations on the directory. So these directory functions should not be allowed if a file is opened.

Why?

Currently if process A creates and writes a file A, there is no stopping for for user or another process B to rename or delete that file A.

This is how it should be.

If file A is deleted while process A is still writing, on the desktop you can see the file A changes in icon to a folder called A.

Might be a bug in the desktop.

As long as process has an open handle to a file, it can access its data, regardless of where, whether or under what name the file resides in. This is also a very true statement... like I mentioned above, even under what when name or no name, it is still able to write to it. Amazingly after that, when closes the file, the file is no longer available or no longer seen in the folder.

These are funny behavior.....

When I run this (named tstlk):

sleep 10 >tstf&
ls -l
mv tstf tstf1
ls  -l
rm -f tstf tstf1
ls  -l

wait %1
ls -l

I get this:

insgesamt 1
-rw-r--r-- 1 hk Benutzer  0  7. Dez 10:48 tstf
-rwxrwxrwx 1 hk Benutzer 83  7. Dez 09:37 tstlk
insgesamt 1
-rw-r--r-- 1 hk Benutzer  0  7. Dez 10:48 tstf1
-rwxrwxrwx 1 hk Benutzer 83  7. Dez 09:37 tstlk
insgesamt 1
-rwxrwxrwx 1 hk Benutzer 83  7. Dez 09:37 tstlk
insgesamt 1
-rwxrwxrwx 1 hk Benutzer 83  7. Dez 09:37 tstlk

On cygwin. MiNT does the same. Is it this what you mean?


--
Helmut Karlowski