I'm looking at porting an OPEN VMS FORTRAN application that drives devices on serial asynchronous lines. It uses VAX System I/O calls to drive the serial ports. I need to port the application to run on UNIX, Windows NT and Windows 2000. I'm hoping to be able to come up with a single version of the code to run on all platforms using standard FORTRAN I/O call likes OPEN, READ, WRITE, CLOSE. At the same time, the application must provide device timeout capability where a device on a serial line does not respond in a timely fashion and where fault recovery processes can be intiated.
The benchmarks I've run so far indicate that I can achieve at least part of the task using standard FORTRAN I/O, i.e., STREAM_LF, etc. I unfortunately find that the behavior of the READ calls is inconsistent on the different platforms when the device does not respond; Windows 2000 suspends the task, UNIX returns immediately with a zero byte read indication, sometimes Windows NT behaves like UNIX. That's the first problem. The other problem is when the task is supended in Windows 2000, the task appears to be blockes such that it does not service the independent timeout signal that it is sent.
I'm looking for suggestions to help me overcome the two problems mentioned.