extracted readWrite() from main()
Set the passed scheduler, like in pi.c
fixed i assignment for dealing with undhandled arguments in handleArgs()
Added child process creation and reaping
made i global
missed a variable declaration