Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Blocked serial ports.

Status
Not open for further replies.

jfryer

Programmer
Sep 5, 2002
120
AU
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 &quot;stty < /dev/ttyb&quot; 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
----------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top