Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: rolling over high-traffic logfiles?



On Thu, 16 Jul 1998, Bart Schaefer wrote:

> On Jul 16,  9:36am, Zefram wrote:
> } Subject: Re: rolling over high-traffic logfiles?
> }
> } mv should use rename() to atomically replace the log file, in which case
> } there is no race condition.
> 
> Fair enough.  There are two or more filesystem operations necessary even
> if only only system call, but I suppose that's only a possible problem
> on a multiprocessor system.

This is why kernel locking is such a big issue in SMP.  The semantics don't
change; rename() is always atomic under Unix.

--
Todd Graham Lewis                                     (800) 719-4664, x2804
******Linux******         MindSpring Enterprises      tlewis@xxxxxxxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author