1

I made an application with Mono. Inside this app I'll start the xsp4 WebServer with this command:

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();

Everything works correctly if I run .app file, launching it from terminal, but if I run the .app with a double click (so without a terminal window), the Process exited immediately and the xsp webserver will never start.
How is it possible?

knocte
  • 16,941
  • 11
  • 79
  • 125
Marco
  • 656
  • 9
  • 28

1 Answers1

1

Solution
Adding this line now works: args += " --nonstop ";

Marco
  • 656
  • 9
  • 28