handling for forking a process