[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Update question
From:       Malte Starostik <malte () kde ! org>
Date:       2002-07-06 2:48:53
[Download RAW message or body]

Am Friday 05 July 2002 23:56 schrieb aleXXX:
> On Friday 05 July 2002 23:11, Nicolas Goutte wrote:
> > This is not specific to KDE.
> >
> > As your underlying system is Linux or something other *nix-like, as far
> > as I know, it buffers the files of the running processes. (It is called
> > mapping.) So you can remove the files without problems for the running
> > processes.
> >
> > Have a nice day/evening/night!
>
> Well, I don't know exactly how it works, but at least if you simply copy
> the new libs over the old libs the apps will instantly crash, if you use
> install instead of cp they won't crash.
I'd assume that's because install will first unlink the old file and then 
create a new one with the same name; while cp just overwrites the old one.
As simply overwriting a file changes its original inode, processes that have 
the file opened might get a mixture of old and new contents (?) or at least 
be somehow confused :-)
If you unlink the file and create it again, you're working on a completely 
different inode. Just create a huge file, then open it from some process and 
while it's open, unlink it: its space is still allocated until all processes 
using it have exited. If the file is accessed via nfs, you'll even see some 
dotfile in its dir (named after the nfs handle AFAIK) so it's won't get 
removed from the server until the last client has stopped using it, even if 
the last server process exited etc.
-- 
Malte Starostik
PGP: 1024D/D2F3C787 [C138 2121 FAF3 410A 1C2A  27CD 5431 7745 D2F3 C787]

[Attachment #3 (application/pgp-signature)]
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic