-
Bug
-
Resolution: Cannot Reproduce
-
P5
-
None
-
1.1.1
-
x86
-
windows_nt
Name: mc57594 Date: 06/17/97
1) run the java program 2b) compiling with either 1.1 or 1.1.1 and it will hang after "Flushed it". All the evidence indicates that the perl script never sees any input. The problem is easily reproduced with a java program in place of the perl script. Makes the Sun Java Server Beta unusable on NT 3.5.1 or NT 4.0 with cgi scripts.
2a) Following perl script:
#! perl
print "hello\n";
read(STDIN, $args, 100);
print OUTPUT $args;
print $args;
close(OUTPUT);
2b) The following java:
public class testExec {
public static void main(String[] args) {
Process process;
String[] command = new String[] {"c:\\NTResKit\\Perl\\perl",
"-x", "ein.pl"};
try {
process = Runtime.getRuntime().exec(command);
System.out.println("Ran it");
InputStream in = process.getInputStream();
BufferedReader brin = new BufferedReader(new InputStreamReader(in));
OutputStream out = process.getOutputStream();
BufferedWriter bout = new BufferedWriter(new OutputStreamWriter(out));
bout.write("This is an output\n");
System.out.println("Wrote it");
bout.flush();
System.out.println("Flushed it");
System.out.println(brin.readLine());
System.out.println("Read it");
} catch (IOException e) {
e.printStackTrace();
return;
}
}
}
======================================================================