I've just written a C# code based on Greg's java code.
The c# code runs with mono runtime on Mac.
Interestingly, my initial test result also shows the same 16384 limit.
So, it appears to me that pipe buffer size between java-process and
mono-process is also 16 KB.
Yong
The Greg's Java spawn method modified to:
------8<------
String[] cmd = new String[]
{
"mono", "monopipe.exe", count
};
C# code:
------8<------
using System;
using System.IO;
public class monopipe
{
public static void
Main( string[] args )
{
monopipe task = new monopipe( args[ 0 ] );
task.write();
}
private String count;
public monopipe( String str )
{ count = str; }
private void write()
{
BinaryWriter standardOutput = new BinaryWriter
(Console.OpenStandardOutput());
int counter = int.Parse(count);
for ( int i = 0; i < counter; ++i )
{
standardOutput.Write(new Byte[1]);
standardOutput.Flush();
}
}
}
On 19-Oct-07, at 2:22 PM, Greg Guerin wrote:
I wouldn't count on it being 16 KB for C apps. It's an easy C
program to
write, because it only needs to implement the Pipelen.write() and
atoi() of
argv functionality. I haven't done it, because what I needed to
know at
the time was the buffer-size for inter-Java processes.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden