Red Hat Topics - fork, execv & state variables

This is Interesting: Free IT Magazines  
Home > Archive > Red Hat Topics > May 2006 > fork, execv & state variables





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author fork, execv & state variables
Mike - EMAIL IGNORED

2006-05-21, 1:12 pm

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.

Peter Jansson

2006-05-21, 7:12 pm

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.
>


<quote src="man fork">
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.
</quote>

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/
Jonathan Mcdougall

2006-05-21, 7:12 pm

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-li...st.html#faq-5.9 for
newsgroup suggestions.


Jonathan

Jonathan Mcdougall

2006-05-21, 7:12 pm

Jonathan Mcdougall wrote:
> Mike - EMAIL IGNORED wrote:
>
> This newsgroup only deals with standard C++, not platform specific
> features. See
> http://www.parashift.com/c++-faq-li...st.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

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com