i am the owner of the pty device created like this permissions are crw-w----
mknod pty1 c 1 1
cat > pty1
tells me operation not permitted.
what i want to do later is that i open the file from a program using open and call write to send output to the terminal, as if it is a disk file.
why is cat not working. can we write to a pty or read from a pty using open and write.
can we do this from java. java writes to a file that is actually a pty.
source of problem: http://stackoverflow.com/questions/2055918/forcing-a-program-to-flush-its-standard-output-when-redirected/
Update: is the question not clear. do i need to add more info?
output of ls -la
crw--w---- 1 iamrohitbanga users 1, 1 2010-01-13 18:27 pty1
crw--w---- 1 iamrohitbanga users 1, 2 2010-01-13 18:29 pty2
also
when i do cat /dev/pts/0 in one terminal and cat > /dev/pts/0 in another, i do not see the input of one getting transferred to another.