Re: flock

"François Revol" <[email protected]>
Newsgroups gmane.os.openbeos.kernel.devel
Message-ID <1747453365-BeMail@laptop>
> > We should collect the differences and implement flock() and F_SETLK
> > correctly, then.
> 
> It's actually as simple as this: flock() locks are bound to file 
> descriptors 
> numbers, fcntl(F_SETLK) locks to file descriptors. Meaning, if you 
> acquire a 
> lock on FD number 4 via flock(), dup2() 4 to 8, you can't unlock 8. 
> And after 
> fork() the child process won't have a lock on FD 4 either. 
> fcntl(F_SETLK) has 
> the expected semantics with respect to dup()/fork().

I don't think so, but it was long ago I digged that.

François.

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.