核心转储后自动重新启动应用程序

发布于 2024-09-03 21:44:52 字数 92 浏览 2 评论 0原文

我有一个 Linux 进程,但有时我会进行一些核心转储。

简单的问题:是否有任何方式/方法/程序/任何能够重新启动 被杀死的进程?

谢谢。

I have a linux process but I am taking some core dumps some times.

Simple question: Is there any way/method/program/whatever that is capable of restarting a
process that got killed?

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

逆蝶 2024-09-10 21:44:52

您可以将进程的执行包装在 shell 脚本中,该脚本将在应用程序退出时继续重新启动应用程序。

You could wrap the execution of the process in a shell script that would simply keep restarting the app as it exits.

如梦 2024-09-10 21:44:52

您可以使用 monit

You can use monit.

南风起 2024-09-10 21:44:52

除了 Soo 提到的之外,请确保您拥有可靠的通知机制,以便您知道您正在频繁重新启动。

考虑使用重新启动计数器,并在重新启动过于频繁或次数过多时停止重新启动。如果你只是崩溃,重新启动并立即再次崩溃,这通常是一件非常糟糕的事情。

In addition to what Soo mentioned, ensure you have a reliable notification mechanism so that you know you're getting frequent restarts.

Consider having a restart counter and stop restarting if you restart either too frequently or too many times. If you're just crashing, restarting and instantly crashing again that's usually a pretty bad thing.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文