Added stub of test for forking
Added tests and code for forking.