Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^2: is sharing variables between forked process possible??

by salva (Canon)
on Feb 17, 2006 at 09:27 UTC ( [id://530896]=note: print w/replies, xml ) Need Help??


in reply to Re: is sharing variables between forked process possible??
in thread is sharing variables between forked process possible??

How? vfork is not available from perl.

And anyway, the manual page for the syscall (on Linux) says:

The vfork() function has the same effect as fork(), except that the behaviour is undefined if the process created by vfork() either modifies any data other than a variable of type pid_t used to store the return value from vfork(), or returns from the function in which vfork() was called, or calls any other function before successfully calling _exit() or one of the exec() family of functions.

It doesn't look like a good option!!!

Replies are listed 'Best First'.
Re^3: is sharing variables between forked process possible??
by Steve_p (Priest) on Feb 17, 2006 at 14:42 UTC

    Not entirely true. You can configure your Perl to use the system vfork() instead of the system fork(). This, however, is not recommended and can lead to unexpected breakages.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://530896]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2024-03-28 08:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found