Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re: Fork() Function

by zentara (Archbishop)
on May 13, 2014 at 14:50 UTC ( #1085913=note: print w/ replies, xml ) Need Help??

in reply to Fork() Function

In addition to the good advice given above, I would like to point out 1 little pitfall which you may encounter. When forking you often get the pid of the shell process invoked which then actually spawns another pid to run your program. So be aware that the pid reported back by fork, will probably be a shell's pid. The shell then has a child, which is your actual program. See Proc://KillFam for a way to kill the entire process tree which results from your fork.

I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh
Comment on Re: Fork() Function
Replies are listed 'Best First'.
Re^2: Fork() Function
by sundialsvc4 (Abbot) on May 13, 2014 at 22:43 UTC

    Heh ... “a little battle-won insight” that is well deserving of the many up-votes that it is now happily accumulating!   :-D   Too-bad I could only praise it once.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (10)
As of 2016-05-31 11:41 GMT
Find Nodes?
    Voting Booth?