Update fork.c

changes to make the program a basic daemon