add fork and ipc code