Don't ask to ask, just ask | |
PerlMonks |
Re^2: Mmap questionby leriksen (Curate) |
on Jan 31, 2005 at 00:46 UTC ( [id://426470]=note: print w/replies, xml ) | Need Help?? |
Your quite right about being passed on fork (but it is not copied across exec's if working at the C level). And zentara I think your right about the octal to decimal conversion. As for using mmap(2) for IPC, Stevens demonstrates a technique for mmap across related processes (you cant use mmap across unrelated processes, because the address is for that process family. If an unrelated process tries to use it, you'll get a SIGSEGV or SIGBUS core dump). He creates a mmap'd area from /dev/zero, then has co-operating parent and child increment a long integer in turn. Stevens last word on mmap and shared memory is "If shared memory is required between unrelated processes, the shmXXX functions must be used" ...it is better to be approximately right than precisely wrong. - Warren Buffet
In Section
Seekers of Perl Wisdom
|
|