This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Semaphores in libc


Unfortunately it seems that my requirements are even more constrained.
Just remembered that my servers are running NFS which seem to make
semaphores useless since they seem to use /dev/shm.
Thought about flock but wikipedia says:
"Whether flock locks work on network filesystems, such as NFS, is
implementation-dependent. On BSD systems flock calls are successful
no-ops. On Linux prior to 2.6.12 flock calls on NFS files would only
act locally. Kernel 2.6.12 and above implement flock calls on NFS
files using POSIX byte range locks. These locks will be visible to
other NFS clients that implement fcntl()/POSIX locks.[1]"

On the other hand one of the servers runs 2.6.16 and all the others
are still in 2.4.21. As you can imagine I am not admin on these so
there's no way I build new kernels.

Is there any solution for me? (I still have the mkdir solution pending
until I confirm it is indeed atomic).

-- 
Paulo Jorge Matos - pocmatos at gmail.com
http://www.pmatos.net


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]