We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我理解的JavaScript运行逻辑主要由三部分组成:
Node.js 中 JavaScript 脚本进程自动结束有以下情况:
process.on('uncaughtException')
process 对象上有四种方法结束进程:
exit([code])
code
process.on('exit')
kill(pid[, signal])
abort()
The text was updated successfully, but these errors were encountered:
No branches or pull requests
进程自动结束
我理解的JavaScript运行逻辑主要由三部分组成:
Node.js 中 JavaScript 脚本进程自动结束有以下情况:
process.on('uncaughtException')
没有用户注册的监听器,默认会在收到未捕获的错误时结束进程代码控制结束进程
process 对象上有四种方法结束进程:
exit([code])
同步地退出进程,
code
默认值 0,取值只能为整数或整数字符串,可通过process.on('exit')
接收code。进程自动结束会调用此方法,能被
process.on('exit')
接收到。kill(pid[, signal])
类似操作系统命令kill,向指定pid进程发送信号,随信号不同将表现不同。
signal=0用于测试进程是否存在,不会结束进程。
abort()
立即退出进程,并打印 Node.js 内核(v8)信息
参考资料
The text was updated successfully, but these errors were encountered: