in reply to Re: Re: Duplicate Output with forking
in thread Duplicate Output with forking

You're getting the duplicate output because both the parent and the child process are falling through to the same print statement.

Try having the child exit after it identifies itself. E.g.,

print p('i am a child!'); exit(0); # don't fall through }

Replies are listed 'Best First'.
Re: Re: Re: Re: Duplicate Output with forking
by skazat (Chaplain) on Mar 21, 2001 at 04:20 UTC

    That did the trick,

    my thanks to you,

     

    -justin simoni
    !skazat!