开发者

Difference between exit() and posix_kill(getmypid(), SIGKILL) in PHP

Can someone explain difference between exit() and posix_kill(getmypid(), 开发者_JS百科SIGKILL) in PHP code?


From the exit() docs page:

Terminates execution of the script. Shutdown functions and object destructors will always be executed even if exit() is called.

SIGKILL, on the other hand, does not allow any cleanup to be done by the process receiving the signal.

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)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜