1. fork () method
The fork () function copies a process based on the parent process. Its ID number is different from that of the parent process. In a Linux environment, fork () is implemented by writing and copying, with only memory and other features different from the parent process. Others are shared with the parent process. Only after the parent process or child process is modified, to generate a new copy.
2. system () method
The system () function calls the "/bin/sh-c command" to execute a specific command (refer to the http://www.cnblogs.com/nufangrensheng/p/3512291.html) and blocks the current process until the command execution is complete.
3. exec () Mode
When fork and system functions are used, a new process will be created in the system to execute the caller's operation, and the original process will still exist until the user exits explicitly; the exec family functions are different from the previous fork and system functions. The exec family functions replace the original process with the new process, and the system runs from the new process, the PID value of the new process is the same as that of the original process.