[Mono-list] xsp, and gtk# install problems on Mac
Gonzalo Paniagua Javier
reply.to.the.list.iam.suscribed@notexists.ximian.com
Tue, 22 Feb 2005 20:46:36 -0500
--=-vgW/MFF0SIAkKzfJ65fk
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
On Mon, 2005-02-21 at 17:05 +0100, Malcolm Schonfield wrote:
>Hi,
>I have a problem with xsp (version 1.0.6.0). I can start the server:
>$ sudo mono /usr/lib/mono/1.0/xsp.exe --port 8081
>xsp
>Listening on port: 8081
>Listening on address: 0.0.0.0
>Root directory: /usr/share/doc/xsp/test
>Hit Return to stop the server.
>
>, however I get the following whenever xsp receives a request:
>System.InvalidOperationException: Process has not been started.
>in <0x00084> System.Diagnostics.Process:get_ExitCode ()
>in <0x0006c> (wrapper remoting-invoke-with-check)
>System.Diagnostics.Process:get_ExitCode ()
[...]
>1) Try removing contents of .wapi directory
> No joy
>2) Make sure $PATH contains mcs
>
>$ echo $PATH
>/sw/bin:/sw/sbin:/bin:/sbin:/usr/bin:/usr/sbin:.
>$ mcs --version
>Mono C# compiler version 1.1.4.0
Can you try running the attached program?
Compile: mcs runprocess.cs
Run: mono runprocess.exe mcs --help
Does it work?
-Gonzalo
--=-vgW/MFF0SIAkKzfJ65fk
Content-Disposition: attachment; filename=runprocess.cs
Content-Type: text/x-csharp; name=runprocess.cs; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
using System;
using System.Diagnostics;
public class Test
{
static bool RunProcess (string exe, string arguments)//, string output_file)
{
Process proc = new Process ();
proc.StartInfo.FileName = exe;
proc.StartInfo.Arguments = arguments;
proc.StartInfo.UseShellExecute = false;
//proc.StartInfo.RedirectStandardOutput = true;
proc.Start ();
//string poutput = proc.StandardOutput.ReadToEnd();
proc.WaitForExit ();
int result = proc.ExitCode;
proc.Close ();
Console.WriteLine ("ExitCode: {0}", result);
return (result == 0);
}
static public int Main (string [] args)
{
if (args.Length < 2) {
Console.WriteLine ("runprocess.exe cmd args");
return 1;
}
bool result = RunProcess (args [0], args [1]);//, args [2]);
if (result) {
//Console.WriteLine ("The output from {0} {1} should be in {2}", args [0]);//, args [1]);//, args [2]);
} else {
//Console.WriteLine ("Failed running: {0} {1} > {2}", args [0]);//, args [1]);//, args [2]);
}
return result ? 0 : 1;
}
}
--=-vgW/MFF0SIAkKzfJ65fk--