评论者:Dexuan Cui
我看的是Ubuntu 14.04里面的man vfork。 里面说的很清楚,子进程禁止调用 exit(): The child must not return from the current function or call exit(3), but may call _exit(2). 另:exit()会调用atexit()注册的函数,而 _exit()不会。
View Article评论者:WONDERFUL
为啥会修改父进程的栈空间,return只会把栈中保存的函数返回地址,EBP,ESP,EIP等寄存器值修改,但是栈中被回收的资源(函数返回地址,EBP,局部变量等)所占用内存空间的值并不被擦除,而EBP,ESP,EIP这些寄存器是每个进程独享的(进程切换时会恢复为对应的进程的值),怎么会导致栈空间中保存的返回地址等信息被破坏呢?求解!
View Article评论者:Bill Lee
<a href="#comment-1789281" rel="nofollow">@WONDERFUL </a> 从 main() 返回后,libc 会做最后的 termination, 进行一些像调用 atexit(3) 注册的函数之类的操作
View Article评论者:Process Problems Caused by vfork – DDCODE
[…] Please refer to: a problem of vfork hanging uphttp://coolshell.cn/articles/12103.html […]
View Article
More Pages to Explore .....