有人可以解释 exit()
之间的区别吗?和 posix_kill(getmypid(), SIGKILL)
在 PHP 代码中?
最佳答案
来自 exit()
docs page :
Terminates execution of the script. Shutdown functions and object destructors will always be executed even if exit() is called.
另一方面,SIGKILL 不允许接收信号的进程进行任何清理。
When sent to a program, SIGKILL causes it to terminate immediately. In contrast to SIGTERM and SIGINT, this signal cannot be caught or ignored, and the receiving process cannot perform any clean-up upon receiving this signal.
( http://en.wikipedia.org/wiki/SIGKILL#Usage )
关于php - PHP 中 exit() 和 posix_kill(getmypid(), SIGKILL) 的区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6261845/