fork, execv & state variables - Redhat

This is a discussion on fork, execv & state variables - Redhat ; Using C++ on FC4, if in a class method, do I do a fork(), do the resulting two processes have separate sets of object state variables? Thanks for your help. Mike....

+ Reply to Thread
Results 1 to 4 of 4

Thread: fork, execv & state variables

  1. fork, execv & state variables

    Using C++ on FC4, if in a class method, do I do a
    fork(), do the resulting two processes have separate
    sets of object state variables?

    Thanks for your help.
    Mike.


  2. Re: fork, execv & state variables

    Mike - EMAIL IGNORED wrote:
    > Using C++ on FC4, if in a class method, do I do a
    > fork(), do the resulting two processes have separate
    > sets of object state variables?
    >
    > Thanks for your help.
    > Mike.
    >



    fork creates a child process that differs from the parent process only
    in its PID and PPID, and in the fact that resource utilizations are set
    to 0. File locks and pending signals are not inherited.


    I believe this implies that the processes "have separate sets of object
    state variables".

    Sincerely,

    Peter Jansson
    http://www.p-jansson.com/
    http://www.jansson.net/

  3. Re: fork, execv & state variables

    Mike - EMAIL IGNORED wrote:
    > Using C++ on FC4, if in a class method, do I do a
    > fork(), do the resulting two processes have separate
    > sets of object state variables?


    This newsgroup only deals with standard C++, not platform specific
    features. See
    http://www.parashift.com/c++-faq-lit...t.html#faq-5.9 for
    newsgroup suggestions.


    Jonathan


  4. Re: fork, execv & state variables

    Jonathan Mcdougall wrote:
    > Mike - EMAIL IGNORED wrote:
    > > Using C++ on FC4, if in a class method, do I do a
    > > fork(), do the resulting two processes have separate
    > > sets of object state variables?

    >
    > This newsgroup only deals with standard C++, not platform specific
    > features. See
    > http://www.parashift.com/c++-faq-lit...t.html#faq-5.9 for
    > newsgroup suggestions.


    I didn't notice the crosspost to linux.redhat.misc, my message only
    applies to comp.lang.c++. To the OP: crossposting is seldom a good
    idea.

    Followup set to l.r.m.


    Jonathan


+ Reply to Thread