vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| > uname -smrsv HP-UX B.11.23 U ia64 Several users need to create segments of shared memory. Duplicate keys must be avoided. Does '(valid) usage of ftok()' guaranty that? It seems that the following actions should be done: A1) Create some file (and not delete it), A2) Generate key with using ftok(). The questions: Q1) Should somebody manage naming and creating such files? Q2) Are there any (underwater) reefs while using ftok()? Alex Vinokur email: alex DOT vinokur AT gmail DOT com http://mathforum.org/library/view/10978.html http://sourceforge.net/users/alexvn |
| |||
| On Apr 17, 11:49*am, Alex Vinokur <ale...@users.sourceforge.net> wrote: > > uname -smrsv > > HP-UX B.11.23 U ia64 > > Several users need to create segments of shared memory. Duplicate keys > must be avoided. > Does '(valid) usage of ftok()' guaranty that? [sniped] Once more question. Can we use a name of some system file as ftok()'s input? For instance, ftok.exe itself? Alex Vinokur email: alex DOT vinokur AT gmail DOT com http://mathforum.org/library/view/10978.html http://sourceforge.net/users/alexvn |
| ||||
| Alex Vinokur wrote: > Duplicate keys must be avoided. > Does '(valid) usage of ftok()' guaranty that? Provided separate (permanent) files and IDs are used. > Q1) Should somebody manage naming and creating such files? Yes. Or use the executable if only one, or some common file. > Q2) Are there any (underwater) reefs while using ftok()? Like what? > Can we use a name of some system file as ftok()'s input? > For instance, ftok.exe itself? Better to have it controlled by the user application space. What ftok.exe? ftok(3) is a libc call and that could be patched often. I suppose you could use /stand/vmunix. |