fork question



if i use fork in my userland app, how do share a global variables between
the parent and all the children? I need to have this variable created such
that if anyone (parent or child) changes it all the other children and the
parent can see the change. My only idea is a mmap'd space, I could let each
process mmap the same space and use it for various shared variables, kind
of like this:
parent: create typedef of layout of mapped space
parent: sp=mmap new shared space based on size of layout
parent: sp->var1 = value
parent: sp->var2 = value
child1: sp=mmap existing shared space
child1: sp->var1 = value
child1: if(sp->var2 == value)...
child2: sp=mmap existing shared space
child2: sp->var1 = value
child2: if(sp->var2 == value)...
Is there another better way?
Thanks
Eric
.



Relevant Pages

  • Re: fork question
    ... > that if anyone (parent or child) changes it all the other children and the ... create typedef of layout of mapped space ... sp=mmap new shared space based on size of layout ... Have the parent create a shared memory area before it 'fork's. ...
    (comp.os.linux.development.apps)
  • Re: book on wxPython?
    ... Many programmers aren't even used to the idea of layout ... hierarchies. ... Windows programmer. ... A child widget is within its parent - it will be clipped to ...
    (comp.lang.python)
  • Re: Execute Package Task and setting its inner Package Global Vaiables
    ... Ok So you want to retrieve the values of child package Global Variables and use them in you Parent as well as setting child global ...
    (microsoft.public.sqlserver.dts)
  • Re: Method to do live resizing in a JFrame?
    ... some layout manager I found at sun's tutorial. ... * @param scale boolean true si les composants sont redimensionnés ... public void layoutContainer(Container parent) { ... This specifies how ...
    (comp.lang.java.gui)
  • Re: Execute Package Task and setting its inner Package Global Vaiables
    ... If you are using the ExecutePackage task then you can pass through a Parent package Global Variable to the child. ... Global variables values from the child package back in the parent. ...
    (microsoft.public.sqlserver.dts)