[geeks] Solaris losing-writers question

Patrick Giagnocavo 717-201-3366 patrick at zill.net
Fri Aug 12 23:05:05 CDT 2005


Here is my situation and my question:

Situation:  I am doing a small, non-PHP website.  I want to put comments on the bottom of the page (at least, some pages).  I will be doing this by writing to a flat file (basically appending to the end of the comments file for each page, so that I can just include the file into the end of the html without having to parse it).

Question:  assume that 2 comments are made to the same pages at the same time, by two different processes (remember that Apache will run things in different processes so we can't do serialized requests easily from within the code).  So the comments are each being appended to the same file.

Does one of the writers lose (not ending with the data being recorded)?  Or does each writer write data into the file, but there are no guarantees which comes first?

--Patrick



More information about the geeks mailing list