- 论坛徽章:
- 0
|
The vfork() function shall be equivalent to fork(), except that the behavior is undefined if the process created by vfork() either modifies any data other than a variable of type pid_t used to store the return value from vfork(), or returns from the function in which vfork() was called, or calls any other function before successfully calling _exit() or one of the exec family of functions.
调用vfork()之后,子进程要么_exit(),要么调用某个exec(),否则都是未定义行为!
另外:
This function is marked obsolescent.
别再纠结啦,放弃这个函数吧 |
|