如果程序在 Windows 中崩溃,如何自动重新启动程序? [英] How to restart program automatically if it crashes in Windows?

查看:26
本文介绍了如果程序在 Windows 中崩溃,如何自动重新启动程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果程序在 Windows 2003 服务器上崩溃,我如何自动启动它?有时我的程序会崩溃,我可以在窗口或设置中进行设置吗?

How can I start my program automatically if it crashes on windows 2003 server? Sometimes my program just crashes, is there a way in windows or settings that I can set?

推荐答案

通常的方法是运行所谓的 guardian 进程.这是一个单独的进程,通常是一个服务,用于监视主进程的状态.当监护人检测到主服务已经死亡时,它会重新生成它.

The usual approach is to run what is known as a guardian process. This is a separate process, often a service, that monitors the state of the main process. When the guardian detects that the main service has died, it re-spawns it.

据我所知,没有内置的 Windows 功能可以为您执行此操作.

To the very best of my knowledge, there is not built in Windows functionality to do this for you.

这篇关于如果程序在 Windows 中崩溃,如何自动重新启动程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆