https://bugzilla.novell.com/show_bug.cgi?id=489019
User [email protected] added comment https://bugzilla.novell.com/show_bug.cgi?id=489019#c3 --- Comment #3 from Gonzalo Paniagua Javier <[email protected]> 2009-03-28 08:08:14 MST --- Compile as: "gcc -o caller caller.c" and "gmcs main.cs". Then run: ./caller Adjust the path to 'mono' (or use another exec* that searches in PATH). The result will be an empty "test-file.log" or an exception, depending on the version of mono. ----caller.c-------------- #include <unistd.h> int main () { close (0); close (1); close (2); return execlp ("/opt/mono/bin/mono", "/opt/mono/bin/mono", "main.exe", NULL); } ------------------------- ------main.cs------------ using System; using System.IO; class Seomething { static private int done = 0; static StreamWriter log = null; public static void mylog(string msg) { if (done == 0) { log = new StreamWriter("mylogfile.log"); done = 1; } log.Write(msg); log.Flush(); } public static void Main(string[] args) { StreamWriter w = new StreamWriter("test-file.log"); w.Write("Hello world"); w.Flush(); try { w.Close(); } catch (Exception e) { mylog("StreamWriter.Close() threw exception\n"); mylog(e.ToString()); } } } --------------------------------- -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
