[clug] Semaphores and shared memory

Martin Pool mbp at samba.org
Mon Jan 26 00:04:06 GMT 2004


On 10 Dec 2003, Jepri <jepri at webone.com.au> wrote:
> Martin Pool wrote:
> 
> >It's somewhat portable.
> >
> >But really, mutexes and SysV IPC are pretty deprecated on Linux.  For
> >example, they aren't automatically cleaned up if your program
> >terminates, and they use a wierd non-filesystem naming scheme.  Just
> >lock the file, or parts of it.
> >
> >See tdb in samba cvs for a good example.
> >
> > 
> >
> I'll do it the file locking way, it does sound better and less complicated.
> 
> Purely out of curiousity, where should I have gone to find this out?  
> Nothing I've read about semaphores suggested that they were old news, so 
> I thought they were still a good idea.

Old thread -- I was just reading the new The Art of Unix Programming,
and it says that SysV IPC (which includes semaphores)

  http://www.catb.org/~esr/writings/taoup/html/ch07s03.html

Perhaps the manpages should be updated to deprecate semop, though the
long list of design bugs ought to give you a clue.

-- 
Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.samba.org/archive/linux/attachments/20040126/41c17328/attachment.bin


More information about the linux mailing list