in reply to File locking

Looking for info on file locking? Why not try the Search field right at the top of the page? It would have given you a tutorial on File locking, which is not perfect but KM's follow-ups are pretty neat,. I like (and use) the one he describes in RE: File Locking.

Using "locking" on the Super Search would also have retrieved a bunch of interesting nodes, for example How do I lock a file?

Replies are listed 'Best First'.
Re: Re: File locking
by nysus (Parson) on May 13, 2001 at 11:53 UTC
    My question was more about whether a new process gets spawned every time a .cgi request is made and how this would affect the need to lock files. I don't know much about how forking and processes work.

    $PM = "Perl Monk's";
    $MCF = "Most Clueless Friar";
    $nysus = $PM . $MCF;

      My question was more about whether a new process gets spawned every time a .cgi request is made and how this would affect the need to lock files.

      Yes, a new process is spawned every time a CGI request is made. There is no direct connection between this fact and the need, if any, to lock files. File locking is a design decision that you'd make in order to try to protect file data if there is a strong possibility that more than one process might update a file simultaneously. The fact that the process might be called via CGI or not doesn't really enter into it.