FreeBSD Port: mono-1.0.5_1
Henrik Jönsson
henke at acc.umu.se
Fri Jan 28 09:39:30 PST 2005
Hi
I'm having trouble running an external program and read its stdout.
Example code (compiled with "mcs Main.cs") works fine in Linux and Windows:
/* Main.cs */
using System;
using System.Diagnostics;
using System.IO;
class MainClass
{
public static void Main(string[] args)
{
Console.WriteLine("Hello");
Process myP = new Process();
ProcessStartInfo pInfo = new ProcessStartInfo("ping", "-c 5 192.168.0.1");
pInfo.UseShellExecute = false;
pInfo.RedirectStandardOutput = true;
myP.StartInfo = pInfo;
myP.Start();
StreamReader sr = myP.StandardOutput;
while(!myP.HasExited)
Console.WriteLine(sr.ReadLine());
Console.WriteLine("Bye!");
}
}
/* end Main.cs */
The errors I get when running "mono Main.exe" are different depending on
FreeBSD version.
4.11:
** (Main.exe:82656): CRITICAL **: file mono-hash.c: line 239
(mono_g_hash_table_lookup): assertion `hash_table != NULL' failed
** ERROR **: file reflection.c: line 8047
(mono_reflection_lookup_dynamic_token): assertion failed: (obj)
aborting...
Abort trap (core dumped)
Freshly installed 5.3:
Assertion failed: (lu->lu_myreq->lr_owner == lu), function
_lock_acquire, file /usr/src/lib/libpthread/sys/lock.c, line 171.
Abort trap (core dumped)
Let me know if you need more info.
Regards Henke
More information about the freebsd-ports
mailing list