convert Process.fork call to Process.spawn