Block in reading tty

Put your problem here if it does not fit any of the other categories.

Block in reading tty

Postby binhsoledas » Thu Oct 29, 2009 8:40 am

Hi All !

I use Runtime.getRuntime().exec("sh /data/data/mypackage/script.sh");

Script.sh:
ln -s /dev/ttyU2 /data/data/mypackage/tty
chmod 777 /data/data/mypackage/tty
cat /data/data/mypackage/tty &
echo "at" > /data/data/mypackage/tty

After executing this script, it will create tty in mypackage. And I read tty. But
when i use
BufferedReader reader = new BufferedReader(new FileReader("/data/data/mypackage/tty"));
while(reader.ready()){
String line = reader.readLine();
}

But it can't read and i check i see reader.ready =false.
So reader will not come in while to readLine
Why reader.ready = false.

I chmoded it.
Any idea to help ?
Thanks
binhsoledas
Junior Developer
Junior Developer
 
Posts: 10
Joined: Wed Sep 16, 2009 4:16 am

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 21 guests