in reply to Re: meddling with forces I can't understand
in thread meddling with forces I can't understand

forgive me, but this is the first time i've done any of this. how do i manage these things?

You never check if fork or exec succeeds.

You never reap your children.

If I'm not mistaken, you run in the parent what you want to run in the child.

i have a feeling i'm running in the parent when i should be running in child too, but like i said, i'm not too sure what fork and exec do.
  • Comment on Re^2: meddling with forces I can't understand

Replies are listed 'Best First'.
Re^3: meddling with forces I can't understand
by ikegami (Patriarch) on Oct 25, 2007 at 00:36 UTC

    You never check if fork or exec succeeds

    The documentation for fork and exec covers this.

    You never reap your children.

    I meant to provide a link to waitpid, one method of doing this.

    i'm not too sure what fork and exec do.

    fork creates a clone of the current process.
    exec replaces the program being run in the current process with another program.
    Check the docs of these functions, and perlipc.