【发布时间】:2011-04-27 04:38:58
【问题描述】:
我有一个过程
Runtime rt = Runtime.getRuntime() ;
Process p = rt.exec(filebase+port+"/hlds.exe +ip "+ip+" +maxplayers "+players+ " -game cstrike -console +port "+port+" -nojoy -noipx -heapsize 250000 +map de_dust2 +servercfgfile server.cfg +lservercfgfile +mapcyclefile mapcycle.txt +motdfile motd.txt +logsdir logs -zone 2048",null, new File(filebase+port)) ;
我想检查这个进程是否正在运行或在崩溃的情况下已经崩溃想要重新启动它,这个进程可以有多个实例可用,具体取决于端口
我可以在 Linux 和 Windows 上跟踪这个东西吗?阅读一些关于它的文章,但这个 1 有点不同,因为它涉及多次出现,并且只需要检查一些特定的过程
【问题讨论】: