Sending control codes to native program
Hello,
I execute a native application with Runtime.getRuntime().exec(), but the application does not return from proc.waitFor(). I feed the application from stdin. Other applications (e.g. cat) runs fine, so believe I have to terminate the input with a CTRL+D or something like this, but it does not work. How can I send a control code to the process?
I tried:
write('\u0004')
write('\u0003')
But why returns:
write('\u000D');
write('\u000A);
an error in the IDE?
Process proc = Runtime.getRuntime().exec(cmd+"\u0004");
BufferedInputStream bufferedIn = new BufferedInputStream(in);
outStream = new BufferedOutputStream(proc.getOutputStream());
errorStream = new BufferedReader(new InputStreamReader(proc
.getErrorStream()));
inStream = new BufferedReader(new InputStreamReader(proc
.getInputStream()));
int b;
while ((b = bufferedIn.read()) != -1) {
outStream.write(b);
}
proc.waitFor();
Thanks, Karsten

