是什么杀死了我的程序,为什么? [英] What killed my process and why?
问题描述
我的应用程序在Linux上作为后台进程运行.当前是在终端"窗口中的命令行启动的.
My application runs as a background process on Linux. It is currently started at the command line in a Terminal window.
最近,用户在执行该应用程序一段时间后,它神秘地死了.文字:
Recently a user was executing the application for a while and it died mysteriously. The text:
杀了
在终端上.这发生了两次.我问其他终端是否有人使用kill命令来杀死进程?不.
was on the terminal. This happened two times. I asked if someone at a different Terminal used the kill command to kill the process? No.
在什么条件下Linux会决定终止我的进程?我相信外壳程序显示为"killed",因为该进程在收到kill(9)信号后就死了.如果Linux发送了kill信号,那么系统日志中是否应该有一条消息说明为什么它被杀死了?
Under what conditions would Linux decide to kill my process? I believe the shell displayed "killed" because the process died after receiving the kill(9) signal. If Linux sent the kill signal should there be a message in a system log somewhere that explains why it was killed?
推荐答案
如果用户或sysadmin没有终止内核可能拥有的程序.内核只会在极端的资源匮乏(例如内存+交换耗尽)之类的特殊情况下终止进程.
If the user or sysadmin did not kill the program the kernel may have. The kernel would only kill a process under exceptional circumstances such as extreme resource starvation (think mem+swap exhaustion).
这篇关于是什么杀死了我的程序,为什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!