Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming.threads > #853 > unrolled thread
| Started by | Hallvard Breien Furuseth <h.b.furuseth@usit.uio.no> |
|---|---|
| First post | 2012-04-26 19:22 +0200 |
| Last post | 2012-04-26 20:13 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to comp.programming.threads
Picking POSIX semaphore names Hallvard Breien Furuseth <h.b.furuseth@usit.uio.no> - 2012-04-26 19:22 +0200
Re: Picking POSIX semaphore names Alain Ketterlin <alain@dpt-info.u-strasbg.fr> - 2012-04-26 20:13 +0200
| From | Hallvard Breien Furuseth <h.b.furuseth@usit.uio.no> |
|---|---|
| Date | 2012-04-26 19:22 +0200 |
| Subject | Picking POSIX semaphore names |
| Message-ID | <hbf.20120426dtwb@bombur.uio.no> |
POSIX only defines the behaviour of semaphore names that start with a slash and contain no other slashes. But have users always access to create such names? They can show up in the filesystem, and non-root users do not have access to create entries in the root directory. For that matter, it sounds annoying if "ls /" lists a large number of named semaphores. Have any conventions emerged for where to put them on systems where their names do show up in the filesystem? /tmp/ springs to mind - on systems where that works, anyway. -- Hallvard
[toc] | [next] | [standalone]
| From | Alain Ketterlin <alain@dpt-info.u-strasbg.fr> |
|---|---|
| Date | 2012-04-26 20:13 +0200 |
| Message-ID | <878vhi5pjy.fsf@dpt-info.u-strasbg.fr> |
| In reply to | #853 |
Hallvard Breien Furuseth <h.b.furuseth@usit.uio.no> writes: > POSIX only defines the behaviour of semaphore names that start with a > slash and contain no other slashes. But have users always access to > create such names? They can show up in the filesystem, and non-root > users do not have access to create entries in the root directory. Semaphore names are logical names, not paths or filenames. > For that matter, it sounds annoying if "ls /" lists a large number of > named semaphores. Have any conventions emerged for where to put them > on systems where their names do show up in the filesystem? /tmp/ > springs to mind - on systems where that works, anyway. From "man sem_overview" on Linux: | Accessing named semaphores via the file system | On Linux, named semaphores are created in a virtual file system, | nor‐ mally mounted under /dev/shm, with names of the form | sem.somename. (This is the reason that semaphore names are limited | to NAME_MAX-4 rather than NAME_MAX characters.) I guess other systems use similar locations. -- Alain.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.programming.threads
csiph-web