in reply to fork - child executes code outside of block

Your assertion (assumption?) that the child should not be able to execute that print line is false. Why should it not when it is outside the entire "if" block?

  • Comment on Re: fork - child executes code outside of block

Replies are listed 'Best First'.
Re^2: fork - child executes code outside of block
by cyadav (Initiate) on Mar 28, 2018 at 14:56 UTC

    Ah! thanks :)