зеркало из https://github.com/mono/mail-archives.git
133 строки
4.8 KiB
HTML
133 строки
4.8 KiB
HTML
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
||
|
<HTML>
|
||
|
<HEAD>
|
||
|
<TITLE> [Mono-bugs] [Bug 489019] mono throwing exception while closing file descriptor 0
|
||
|
</TITLE>
|
||
|
<LINK REL="Index" HREF="index.html" >
|
||
|
<LINK REL="made" HREF="mailto:mono-bugs%40lists.ximian.com?Subject=%5BMono-bugs%5D%20%5BBug%20489019%5D%20mono%20throwing%20exception%20while%20closing%20file%0A%09descriptor%200&In-Reply-To=bug-489019-28286%40https.bugzilla.novell.com/">
|
||
|
<META NAME="robots" CONTENT="index,nofollow">
|
||
|
<META http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
||
|
<LINK REL="Previous" HREF="087369.html">
|
||
|
<LINK REL="Next" HREF="087409.html">
|
||
|
</HEAD>
|
||
|
<BODY BGCOLOR="#ffffff">
|
||
|
<H1>[Mono-bugs] [Bug 489019] mono throwing exception while closing file descriptor 0</H1>
|
||
|
<B>bugzilla_noreply at novell.com</B>
|
||
|
<A HREF="mailto:mono-bugs%40lists.ximian.com?Subject=%5BMono-bugs%5D%20%5BBug%20489019%5D%20mono%20throwing%20exception%20while%20closing%20file%0A%09descriptor%200&In-Reply-To=bug-489019-28286%40https.bugzilla.novell.com/"
|
||
|
TITLE="[Mono-bugs] [Bug 489019] mono throwing exception while closing file descriptor 0">bugzilla_noreply at novell.com
|
||
|
</A><BR>
|
||
|
<I>Sat Mar 28 10:08:15 EDT 2009</I>
|
||
|
<P><UL>
|
||
|
<LI>Previous message: <A HREF="087369.html">[Mono-bugs] [Bug 489019] mono throwing exception while closing file descriptor 0
|
||
|
</A></li>
|
||
|
<LI>Next message: <A HREF="087409.html">[Mono-bugs] [Bug 489019] mono throwing exception while closing file descriptor 0
|
||
|
</A></li>
|
||
|
<LI> <B>Messages sorted by:</B>
|
||
|
<a href="date.html#87384">[ date ]</a>
|
||
|
<a href="thread.html#87384">[ thread ]</a>
|
||
|
<a href="subject.html#87384">[ subject ]</a>
|
||
|
<a href="author.html#87384">[ author ]</a>
|
||
|
</LI>
|
||
|
</UL>
|
||
|
<HR>
|
||
|
<!--beginarticle-->
|
||
|
<PRE><A HREF="https://bugzilla.novell.com/show_bug.cgi?id=489019">https://bugzilla.novell.com/show_bug.cgi?id=489019</A>
|
||
|
|
||
|
User <A HREF="http://lists.ximian.com/mailman/listinfo/mono-bugs">gonzalo at novell.com</A> added comment
|
||
|
<A HREF="https://bugzilla.novell.com/show_bug.cgi?id=489019#c3">https://bugzilla.novell.com/show_bug.cgi?id=489019#c3</A>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
--- Comment #3 from Gonzalo Paniagua Javier <<A HREF="http://lists.ximian.com/mailman/listinfo/mono-bugs">gonzalo at novell.com</A>> 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: <A HREF="https://bugzilla.novell.com/userprefs.cgi?tab=email">https://bugzilla.novell.com/userprefs.cgi?tab=email</A>
|
||
|
------- You are receiving this mail because: -------
|
||
|
You are the QA contact for the bug.
|
||
|
</PRE>
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<!--endarticle-->
|
||
|
<HR>
|
||
|
<P><UL>
|
||
|
<!--threads-->
|
||
|
<LI>Previous message: <A HREF="087369.html">[Mono-bugs] [Bug 489019] mono throwing exception while closing file descriptor 0
|
||
|
</A></li>
|
||
|
<LI>Next message: <A HREF="087409.html">[Mono-bugs] [Bug 489019] mono throwing exception while closing file descriptor 0
|
||
|
</A></li>
|
||
|
<LI> <B>Messages sorted by:</B>
|
||
|
<a href="date.html#87384">[ date ]</a>
|
||
|
<a href="thread.html#87384">[ thread ]</a>
|
||
|
<a href="subject.html#87384">[ subject ]</a>
|
||
|
<a href="author.html#87384">[ author ]</a>
|
||
|
</LI>
|
||
|
</UL>
|
||
|
|
||
|
<hr>
|
||
|
<a href="http://lists.ximian.com/mailman/listinfo/mono-bugs">More information about the mono-bugs
|
||
|
mailing list</a><br>
|
||
|
</body></html>
|