当前位置: 技术问答>linux和unix
exit(0)和_exit(0)有什么区别呢?
来源: 互联网 发布时间:2015-02-19
本文导语: 对程序运行有什么影响呢? | _exit是系统调用 exit是c库函数 _exit - terminate the current process SYNOPSIS #include void _exit(int status); DESCRIPTION _exit termin...
对程序运行有什么影响呢?
|
_exit是系统调用
exit是c库函数
_exit - terminate the current process
SYNOPSIS
#include
void _exit(int status);
DESCRIPTION
_exit terminates the calling process immediately. Any open file descriptors belong?
ing to the process are closed; any children of the process are inherited by process
1, init, and the process's parent is sent a SIGCHLD signal.
status is returned to the parent process as the process's exit status, and can be
collected using one of the wait family of calls.
RETURN VALUE
_exit never returns.
===================================================
exit - cause normal program termination
SYNOPSIS
#include
void exit(int status);
DESCRIPTION
The exit() function causes normal program termination and the value of status is
returned to the parent. All functions registered with atexit() and on_exit() are
called in the reverse order of their registration, and all open streams are flushed
and closed.
RETURN VALUE
The exit() function does not return.
exit是c库函数
_exit - terminate the current process
SYNOPSIS
#include
void _exit(int status);
DESCRIPTION
_exit terminates the calling process immediately. Any open file descriptors belong?
ing to the process are closed; any children of the process are inherited by process
1, init, and the process's parent is sent a SIGCHLD signal.
status is returned to the parent process as the process's exit status, and can be
collected using one of the wait family of calls.
RETURN VALUE
_exit never returns.
===================================================
exit - cause normal program termination
SYNOPSIS
#include
void exit(int status);
DESCRIPTION
The exit() function causes normal program termination and the value of status is
returned to the parent. All functions registered with atexit() and on_exit() are
called in the reverse order of their registration, and all open streams are flushed
and closed.
RETURN VALUE
The exit() function does not return.
您可能感兴趣的文章:
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。