Learning how to program serial ports using Ada (dont ask) on Solaris 8 this quote has appeared a couple of times in various books I have perused - "Blocked output on tty devices is by far the most common cause of unkillable processed"
My question is how do unblock such an occurrance once it has occured?
I open ttyb and then write 1 byte to it the hardware attached to it and read the port waiting for a response, if I get no response I then execute a separate program to act as a simulator for that piece of hardware.
Great in theory but instead what happens is the port is opened, the 1 byte is written to the port, the Read command timeouts immedialtely (even though VTime is set to 0), the port is then closed and the simulator is loaded. And when I try to execute the program again it hangs on the command to open the serial port because the port is blocked.
trying "stty < /dev/ttyb" from a terminal just freezes the terminal with no result.
So while I hopefully can figure out what I am doing wrong code wise, I can't seem to unblock a blocked port and that is causing problems.
Any ideas how to do it anyone? ----------------------------------------
There are no onions, only magic
----------------------------------------
My question is how do unblock such an occurrance once it has occured?
I open ttyb and then write 1 byte to it the hardware attached to it and read the port waiting for a response, if I get no response I then execute a separate program to act as a simulator for that piece of hardware.
Great in theory but instead what happens is the port is opened, the 1 byte is written to the port, the Read command timeouts immedialtely (even though VTime is set to 0), the port is then closed and the simulator is loaded. And when I try to execute the program again it hangs on the command to open the serial port because the port is blocked.
trying "stty < /dev/ttyb" from a terminal just freezes the terminal with no result.
So while I hopefully can figure out what I am doing wrong code wise, I can't seem to unblock a blocked port and that is causing problems.
Any ideas how to do it anyone? ----------------------------------------
There are no onions, only magic
----------------------------------------