Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Jan 2005 18:40:40 +0100
From:      =?ISO-8859-1?Q?Henrik_J=F6nsson?= <henke@acc.umu.se>
To:        coop9211@uidaho.edu
Cc:        ports@FreeBSD.org
Subject:   FreeBSD Port: mono-1.0.5_1
Message-ID:  <41FA7918.9060801@acc.umu.se>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?41FA7918.9060801>