c++ fork函数的返回值意义
负值:创建子进程失败。
零: 返回到新创建的子进程。
正值:返回父进程或调用者。
官方解释:
On success, the PID of the child process is returned in the parent, and 0 is returned in the child. On failure, -1 is returned in the parent, no child process is created, and errno is set appropriately.