Changed the incorrect knife call to fork
Changed the incorrect call to parenting to wait
Changed the incorrect conditions to use the right values for return value of call to fork