Note that this is Sys V-specific code. BSD-based and other kernels have no such support for this type of shared memory. The most portable way to create shared memory (UN*X, that is) is to create memory using mmap() and mmap() again (with MAP_SHARED) in the other process which is obviously very different from your Sys V shmget() which is implicitly called in your tie() line (you'll also want to look into memory mutexing). Unfortunately, the
IPC modules on CPAN tend to tilt more towards the Sys V side (which is not always the best thing). Of course, you can disregard my commentary if you're not planning on throwing your code from computer to computer, but, in your shoes, I might consider POSIX IPC which is partially supported in the
IPC modules, partially in
POSIX, and partially not at all. It's still worth looking into, though. Hopefully, Perl6 will include more POSIX stuff. The shm_open() POSIX function is simple enough, though, to punch through yourself in perl. Have fun!
AgentM Systems nor Nasca Enterprises nor
Bone::Easy nor Macperl is responsible for the
comments made by
AgentM. Remember, you can build any logical system with NOR.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.