1

我用 Mono 做了一个应用程序。在这个应用程序中,我将使用以下命令启动 xsp4 WebServer:

string exe = "xsp4";
string args = "--root " + Path.Combine(Path.Combine(FSys.AppPath, "support"), "webapp");                                
args += " --port " + _activePort;                                    
Process _procServerMac = new Process();
_procServerMac.EnableRaisingEvents = true;
_procServerMac.StartInfo.FileName = exe;
_procServerMac.StartInfo.Arguments = args;                                
_procServerMac.StartInfo.UseShellExecute = false;
_procServerMac.StartInfo.CreateNoWindow = true;                                                                                              
_procServerMac.Start();

如果我运行 .app 文件并从终端启动它,一切正常,但如果我双击运行 .app(所以没有终端窗口),进程立即退出,xsp 网络服务器永远不会启动。
这怎么可能?

4

1 回答 1

1

解决方案
现在添加此行有效:args += " --nonstop ";

于 2015-02-06T14:49:29.757 回答