07-17-07 06:21 PM
Seth <Seth7TS@gmail.com> writes:
> Hi,
> my question is:
> I have a fortran program under unix, and the execution of it can last
> many minutes.
> While this is running if i delete the file that i have just ran(from
> the console) nothing happens, it finish is execution.
> This is normal or just a coincidence? if i start a bin file its loaded
> entirely into memory?so i can delete it from hd? o in some case it
> could be an error?
Even if the file is not loaded entirely in memory, you can delete it,
and the kernel may still load missing parts later.
In unix, rm(1) or unlink(2) DO NOT delete the files.
There is NO syscall to delete any file in unix!
On the other hand, there is reference counting and a garbage collector.
When you use link(2) (ln(1) without -s) or open(2), you increment the
reference count.
When you use unlink(2) or close(2), you decrement the reference count.
The problem is that ls(1) only shows the reference count corresponding
to link/unlink, not to open/close. Nonetheless, removing a link
DOESN'T delete the file.
The only thing that may suscitate the garbage collection of an i-node
blocks, is for the reference count to reach 0.
--
__Pascal Bourguignon__ http://www.informatimago.com/
NOTE: The most fundamental particles in this product are held
together by a "gluing" force about which little is currently known
and whose adhesive power can therefore not be permanently
guaranteed.
[ Post a follow-up to this message ]
|