Re: Kill fastcgi process

Matthew Weigel <[email protected]>
Newsgroups gmane.comp.web.fastcgi.devel
Message-ID <[email protected]>
Matt wrote:

> Let's see if I have this correct. cp is doing some like:
> ofstream fout;
> fout.open("somefile.txt");
> fout.write(data, length);
> fout.close();
> 
> While mv is just manipulating the file system tables?
> 
> So if some other process had somefile.txt open for input and was still reading from it, a cp
> would interrupt that process but an mv would allow that process to finish?

Yes.  I mean, it depends on the particular system to some extent, but this is
why operating systems provide locking mechanisms.  It doesn't really matter
what the exact behavior is... what matters is that you don't know, so you like
files you think other processes might be touching. :-)
-- 
 Matthew Weigel
 hacker
 unique & idempot . ent
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.