[FASTCGI] Kill fastcgi process

Matt fastcgi-developers at wilber.pointclark.net
Fri Jul 31 01:47:47 EDT 2009


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++)?


More information about the FastCGI-developers mailing list