exit函数
_exit和_Exit立即进入内核
exit则先执行一些清理处理(关闭所有标准I/O流)
if(fork() == 0)
{
printf("hello quange.");
exit(0);
}
printf("hello furong.");
_Exit(0);
# ./a.out
hello quange.
_exit和_Exit立即进入内核
exit则先执行一些清理处理(关闭所有标准I/O流)
if(fork() == 0)
{
printf("hello quange.");
exit(0);
}
printf("hello furong.");
_Exit(0);
# ./a.out
hello quange.