in reply to Creating Child without overhead of Parent

If you've got an OS supporting Copy-On-Write forking, then the child is unlikely to be very large unless significant changes are made to large data structures etc. In your particular case it would seem simpler just to use a system since you're forking and waiting for the child to return anyway.
HTH

_________
broquaint

  • Comment on Re: Creating Child without overhead of Parent

Replies are listed 'Best First'.
Re^2: Creating Child without overhead of Parent (vfork)
by jeffa (Bishop) on Jun 25, 2004 at 15:29 UTC

    And in the unlikely event that your OS does not support Copy-On-Write (but does support fork ...) then look into the vfork() system call.

    UPDATE: s/threads/fork/ ... silly /me

    jeffa

    L-LL-L--L-LL-L--L-LL-L--
    -R--R-RR-R--R-RR-R--R-RR
    B--B--B--B--B--B--B--B--
    H---H---H---H---H---H---
    (the triplet paradiddle with high-hat)