termio(7) and read(2) problem!
Leslie Mikesell
les at chinet.chi.il.us
Tue Jan 10 02:40:49 AEST 1989
In article <137 at zebra.UUCP> vern at zebra.UUCP (Vernon C. Hoxie) writes:
>
> I have been trying to write a test program for a Trailblazer.
>It is connected to /dev/tty000. The program opens this file with:
>
> fd = open("/dev/tty000", O_RDWR | O_NDELAY);
You probably need to use fcntl() to turn off the O_NDELAY before
trying to use the port (set CLOCAL first if you need it). Write()s
don't wait for the hardware to be ready if you leave O_NDELAY
set and strange things happen. I have seen code that indicated that
a close(open(/dev/ttywhatever,2) was needed to force the mode to
changed. Does anyone know which versions of unix require this?
Les Mikesell
More information about the Unix-pc.general
mailing list