|
Posted by David T. Ashley on 11/30/06 15:56
"David T. Ashley" <dta@e3ft.com> wrote in message
news:giCbh.3572$xf7.2887@fe81.usenetserver.com...
> The solution you proposed above probably has race conditions.
> Specifically, if a log entry is made (by another process) at the points
> I've marked with an asterisk above, you will lose some lines from the log
> file.
Also, if you're seeing this problem for the first time, this might help:
http://en.wikipedia.org/wiki/Race_condition
The operating system will assign CPU time to processes in unpredictable
patterns, so if one process stops running and the other goes at the points
I've marked with an asterisk ...
The "mv" solution is robust because Unix was designed that way ... the
solution you proposed probably has a race conditions that may cause log file
lines to be lost.
Navigation:
[Reply to this message]
|