Mailing List Archive

Support open source code!


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

Re: tlug: Overwriting running executable



> This is why you can do something like `prog data; rm data' with no
> ill-effects.

I don't understand this sample.  'prog data; rm data' seems
nothing to do with inode count.
# Or, you're assuming 'prog' a daemon?

But in unix, the inode trick is often used for handling
temporary (or intermediate) files.

	# perl sample
	$TMPFILE = "/tmp/afo.$$";	# temporary file name
	open(TMPFILE, "+>$TMPFILE");	# open as read-write
	unlink($TMPFILE);		# unlink it

At this point, the file is no more accessible from the file
system, but it IS opened and accessible from the program itself
until the file is closed, at which time the disk space is
released and freed.

This is one way to avoid the program to leave any garbage.


> And why doesn't Windows (even NT) do it this way?

Haven't you ever thought it strange that you have to restart
these OSs everytime you (un)install an application?? ;-)
# It seems they don't have any concept of "ldconfig"
Don't bother yourself thinking of the behavior of these products.
Just live with them AS-IS.


--- Kenichiro TANAKA
---------------------------------------------------------------
Next Nomikai: 20 November, 19:30 Tengu TokyoEkiMae 03-3275-3691
Next Technical Meeting: January, 1999 (details TBA)
---------------------------------------------------------------
Sponsor: PHT, makers of TurboLinux http://www.pht.co.jp


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links