Re: Kill fastcgi process

"Matt" <fastcgi-developers-ZZ3zTlmqjYs1+lMOHNVa3ltFE3g8mehB@public.gmane.org>
Newsgroups gmane.comp.web.fastcgi.devel
Message-ID <013a01ca11a2$6f243b20$e701a8c0@cu>
Matthew writes...

["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. :-)"]

So you lock files you think other processes might be touching? What locking mechanisms are available in a Linux environment(C++)?
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.