Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

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

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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (7)
As of 2017-10-19 23:12 GMT
Find Nodes?
    Voting Booth?
    My fridge is mostly full of:

    Results (258 votes). Check out past polls.