Date: Thu, 04 Nov 2004 16:16:08 -0800 From: "Ronald F. Guilmette" <rfg@monkeys.com> To: Henrik W Lund <henrik.w.lund@broadpark.no> Cc: freebsd-questions@freebsd.org Subject: Re: Trying to understand flock() Message-ID: <50176.1099613768@monkeys.com> In-Reply-To: Your message of Thu, 04 Nov 2004 22:03:40 %2B0100. <418A992C.6040806@broadpark.no>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <418A992C.6040806@broadpark.no>, you wrote: > From the flock manpage: > >"...file descriptors duplicated through dup(2) or fork(2) do not result >in multiple instances of a lock, but rather multiple references to the >same lock." > >You're basically trying to place a lock you already hold, making the >flock function return immediately (this is what I gather, anyhow). The >fcntl function seems to operate slightly differently in this respect. > >This is the only explanation I can think of, others might think >differently, though. Thank you. That seems to make sense, now that you have explained it for me.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?50176.1099613768>