Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

fork method

by manoj_speed (Priest)
on Mar 13, 2009 at 07:02 UTC ( #750331=perlquestion: print w/ replies, xml ) Need Help??
manoj_speed has asked for the wisdom of the Perl Monks concerning the following question:

Hi friends

I declared a variable in my program. After that I used fork() method. In the child process I changed the value of the variable that I declared before using fork(). It does not affect the value in parent process. Is there any way to change the value of variable in child process that affects the value in parent process?

Comment on fork method
Re: fork method
by vinoth.ree (Parson) on Mar 13, 2009 at 07:07 UTC

    I think you can use the vfork system call.

      Dear friend,

      This method is not working.

      Have a look at lakshmananindia's post
Re: fork method
by lakshmananindia (Chaplain) on Mar 13, 2009 at 07:12 UTC

    Its good to have a look at Sharing Variables between fork

    You can also try using IPC

    --Lakshmanan G.

    Your Attempt May Fail, But Never Fail To Make An Attempt

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://750331]
Approved by olus
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (8)
As of 2014-08-02 02:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Who would be the most fun to work for?















    Results (53 votes), past polls