Re: question about forked processes writing to the same file
- From: "it_says_BALLS_on_your forehead" <simon.chao@xxxxxxx>
- Date: 29 Oct 2005 07:38:40 -0700
axel@xxxxxxxxxxxxxxxxxxxxxx wrote:
> it_says_BALLS_on_your_forehead <simon.chao@xxxxxxxxx> wrote:
>
> > axel@xxxxxxxxxxxxxxxxxxxxxx wrote:
> >> >> Thanks for sharing. Then the lock is probably not redundant, as I
> >> >> previously was suspecting, even if I'm doing it as well.
>
> >> > yeah, i don't think it's an issue when you're appending small strings
> >> > to a file, but they should make file locking default, don't you think?!
> >> > :-)
>
> >> > when *wouldn't* you want to lock a file when writing?
>
> >> Simple... when you have several Apache processes dealing with
> >> web requests more or less at the same time and wanting to just
> >> append to a log file. I was a bit worried about this at one
> >> time using Solaris but I investigated and found it not to
> >> be a problem. I suspect that BSD and Linux work in a similar
> >> manner... I cannot answer for any other operating systems.
>
> > actually, i had several processes appending to the same log file and
> > came across records that had spliced entries. this was the very problem
> > of which i spoke, and why i ended up needing to explicitly flock.
>
> Which operating system were you using? I never ran across this problem
> using Solaris.
>
> Axel
SunOS 5.8
.
- References:
- question about forked processes writing to the same file
- From: it_says_BALLS_on_your forehead
- Re: question about forked processes writing to the same file
- From: it_says_BALLS_on_your forehead
- Re: question about forked processes writing to the same file
- From: Gunnar Hjalmarsson
- Re: question about forked processes writing to the same file
- From: it_says_BALLS_on_your forehead
- Re: question about forked processes writing to the same file
- From: Gunnar Hjalmarsson
- Re: question about forked processes writing to the same file
- From: it_says_BALLS_on_your forehead
- Re: question about forked processes writing to the same file
- From: axel
- Re: question about forked processes writing to the same file
- From: it_says_BALLS_on_your_forehead
- question about forked processes writing to the same file
- Prev by Date: Re: Typing tutor help script needed, please
- Next by Date: FAQ 5.25 How do I set a file's timestamp in perl?
- Previous by thread: Re: question about forked processes writing to the same file
- Next by thread: Re: question about forked processes writing to the same file
- Index(es):